25.07.2015, 03:21
PHP код:
CMD:afk(playerid, params[])
{
new string[64], motivo[64];
if(!AFK[playerid])
{
if(sscanf(params, "s[128]", motivo))
{
SendClientMessage(playerid, -1, "Digite: /afk [motivo]");
return 1;
}
{
format(string, sizeof string, "[AFK]O Jogador {00BFFF}(%s) {FFFFFF}Estб AFK, Motivo: {00BFFF}%s", PlayerName(playerid), motivo);
SendClientMessageToAll(-1, string);
}
SetPlayerPos(playerid, 322.197998,302.497985,999.148437);
SetPlayerInterior(playerid, 5);
SetPlayerHealth(playerid, 9999);
ResetPlayerWeapons(playerid);
AFK[playerid] = true;
}
else
{
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
AFK[playerid] = false;
format(string, sizeof string, "o Jogador {00BFFF}(%s){FFFFFF} Saiu Do AFK !", PlayerName(playerid));
SendClientMessageToAll(01, string);
}
return 1;
}
[AFK]O Jogador {00BFFF}(%s) {FFFFFF}Estб AFK, Moti