01.01.2015, 19:26
(
Последний раз редактировалось Dolpin; 02.01.2015 в 22:59.
)
Good, but:
pawn Код:
new afk[MAX_PLAYERS];
CMD:afk(playerid, params[])
{
new reason[28], Name[MAX_PLAYER_NAME], Inf[100];
if(sscanf(params, "s[28]", reason)) return SendClientMessage(playerid, -1, "Use: /afk <Reason>");
afk[playerid] = afk[playerid] == 1 ? 0 : 1;
GetPlayerName(playerid, Name, sizeof(Name));
format(Inf, sizeof(Inf), "%s are: %s. Reason: %s", Name, afk[playerid] == 1 ? ("AFK") : ("To back"), reason);
SendClientMessageToAll(-1, Inf);
TogglePlayerControllable(playerid, afk[playerid] == 1 ? 0 : 1);
return 1;
}