Tessék itt van egy. Tesztelve
CMD:afk(playerid, cmdtext)
{
new pname[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), \"%s(%d) {FF0000}<<== {00FF00}AFK-ba lépett {FF0000}:=>>\", pname,playerid);
SendClientMessageToAll(GetPlayerColor(playerid),string);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, 0x74E80099, \"AFK-ban vagy ah visszajösz /back\");
return 1;
}
CMD:back(playerid, cmdtext)
{
new pname[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), \"%s(%d) {FF0000}<<= {00FF00}Kilépett az AFK-ból {FF0000}=>>\", pname);
SendClientMessageToAll(GetPlayerColor(playerid),string);
TogglePlayerControllable(playerid, 1);
return 1;
}