17.06.2014, 13:39
pawn Код:
if(!strcmp("/afk", cmdtext, true))
{
SendClientMessage(playerid, 0xFFFF00C8 , "You have activated AFK mode. Use /back to return to the game!");
SetPlayerHealth(playerid, 99999.0);
TogglePlayerControllable(playerid, 0);
new fstr[55], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(fstr, sizeof(fstr), "[INFO] Player %s is now AFK.", name);
SendClientMessageToAll(-1, fstr);
return 1;
}
https://sampwiki.blast.hk/wiki/Format
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/SendClientMessageToAll