10.12.2016, 21:27
PHP Code:
CMD:event(playerid, params[])
{
if( pInfo[playerid][pAdmin] < 5 )
return 0;
new id;
if (isnull(params))
return SendUsageError( playerid, "/event [create/rename/teles/kick/freeze/disarm/weapons/end]" );
if(!strcmp(params, "kick", true))
{
new kid;
if (sscanf(params, "su", "kick", kid))
return SendUsageError( playerid, "/event [kick] [ID]" );
if(inEvent[kid] == 1)
{
format(str, sizeof(str), "[EVENT] {FFFFFF}%s has been kicked from the event", Name[kid], kid);
SendClientMessageToAll(COLOR_EVENT, str);
SetPlayerHealth(kid, 0);
inEvent[kid] = 0;
eInfo[eventFrozen] = 0;
TogglePlayerControllable(kid, 1);
}
else
{
Error(playerid, "This player is not participating in your event");
}
}
return 1;
}