mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-07-03 17:51:55 +00:00
Add tell, say functions
This commit is contained in:
@ -26,19 +26,11 @@ namespace notifies
|
||||
std::string message = game::ConcatArgs(1);
|
||||
message.erase(0, 1);
|
||||
|
||||
scheduler::once([message, clientNum]()
|
||||
{
|
||||
const scripting::entity level{*game::levelEntityId};
|
||||
const auto _player = scripting::call("getEntByNum", {clientNum});
|
||||
const scripting::entity level{*game::levelEntityId};
|
||||
const auto player = scripting::call("getEntByNum", {clientNum}).as<scripting::entity>();
|
||||
|
||||
if (_player.get_raw().type == game::SCRIPT_OBJECT)
|
||||
{
|
||||
const auto player = _player.as<scripting::entity>();
|
||||
|
||||
scripting::notify(level, "say", {player, message});
|
||||
scripting::notify(player, "say", {message});
|
||||
}
|
||||
});
|
||||
scripting::notify(level, "say", {player, message});
|
||||
scripting::notify(player, "say", {message});
|
||||
}
|
||||
|
||||
return client_command_hook.invoke<void>(clientNum);
|
||||
|
Reference in New Issue
Block a user