04.11.2017, 13:56
(
Последний раз редактировалось frouzen; 04.11.2017 в 14:28.
)
PHP код:
public OnPlayerUpdate(playerid) {
if(GetPlayerPing(playerid) > MAX_PING)
{
if(!isFrozen[playerid])
{
TogglePlayerControllable(playerid, 0); //true/freeze
SendClientMessage(playerid, -1, "true");
isFrozen[playerid] = true;
}
}
else if(GetPlayerPing(playerid) < MAX_PING)
{
if(isFrozen[playerid])
{
TogglePlayerControllable(playerid, 1); //false/unfreeze
SendClientMessage(playerid, -1, "false");
isFrozen[playerid] = false;
}
}
}