big refactor, WIP!
This commit is contained in:
31
framework/init/functions/fn_addRespawnChatHandler.sqf
Normal file
31
framework/init/functions/fn_addRespawnChatHandler.sqf
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
[
|
||||
"respawn",
|
||||
{
|
||||
_clientID = _thisArgs select 0;
|
||||
player setDamage 1;
|
||||
|
||||
// log to server RPT
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"CHAT COMMAND RESPAWN",
|
||||
[player] call EFUNC(common,addPlayerInfoToArray)
|
||||
] remoteExec [QEFUNC(common,log), 2];
|
||||
|
||||
// systemChat to all remote machines
|
||||
format["%1 claims they were glitched and respawned (%2)", name player, netID player] remoteExec["systemChat", -_clientID];
|
||||
},
|
||||
"all",
|
||||
[clientOwner]
|
||||
] call CBA_fnc_registerChatCommand;
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Respawn chat handler registered",
|
||||
[player] call EFUNC(common,addPlayerInfoToArray)
|
||||
] call EFUNC(common,log);
|
||||
|
||||
nil;
|
||||
Reference in New Issue
Block a user