24.07.2015, 00:26
PHP код:
new bool:AFK[MAX_PLAYERS];
CMD:afk(playerid)
{
new string[64];
if(!AFK[playerid])
{
SetPlayerPos(playerid, 322.197998,302.497985,999.148437);
SetPlayerInterior(playerid, 5);
SetPlayerHealth(playerid, 9999);
ResetPlayerWeapons(playerid);
AFK[playerid] = true;
format(string, sizeof string, "o Jogador (%s) Estб no /AFK", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
}
else
{
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
AFK[playerid] = false;
format(string, sizeof string, "o Jogador (%s) Saiu Do AFK /sairafk", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
}
return 1;
}