AFK system sa pouziva, ked hrac chce odist od PC. Napise jednoduhy prikaz AFK čo znamenam Away From Keyboard.
Hore do modu:
OnPlayerCommandText:
Ide to rozne vylepsit.. atd GL
Hore do modu:
- kód:
new AFK[MAX_PLAYERS] = false;
OnPlayerCommandText:
- kód:
if(strcmp(cmdtext, "/afk", true) == 0)
{
new playername[24], str[256];
if(!AFK[playerid])
{
GetPlayerName(playerid, playername, 24);
format(str, 256, "%s (ID: %d) je prave AFK", playername, playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
TogglePlayerControllable(playerid, false);
AFK[playerid] = true;
}
if(AFK[playerid])
{
GetPlayerName(playerid, playername, 24);
format(str, 256, "%s (ID: %d) je opat v hre", playername, playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
TogglePlayerControllable(playerid, true);
AFK[playerid] = false;
}
return true;
}
Ide to rozne vylepsit.. atd GL