SA-MP Forums Archive
AFK with reason - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AFK with reason (/showthread.php?tid=94268)



AFK with reason - DauerDicht - 28.08.2009

Quote:

if(strcmp("/afk",cmd,true)==0)
{
if(PlayerInfo[PLAYER_AFK][playerid])return SendMessage(playerid,"Du bist schon AFK!");
new string[128];

if(!strlen(cmdtext[5]))format(string,sizeof(string),"%s ist jetzt AFK.",PlayerName(playerid));
else format(string,sizeof(string),"*** %s ist jetzt AFK. (Grund: %s)",PlayerName(playerid),cmdtext[5]);
SendLanguageMessageToAll(LANG_DE,string);


PlayerInfo[PLAYER_AFK][playerid]=true;
TogglePlayerControllable(playerid,false);
return 1;
}

if(strcmp("/re",cmd,true)==0)
{
if(!PlayerInfo[PLAYER_AFK][playerid])return SendMessage(playerid,"Du bist nicht AFK!");
new string[128];

format(string,sizeof(string),"%s ist jetzt nicht mehr AFK.",PlayerName(playerid));
SendLanguageMessageToAll(LANG_DE,string);


PlayerInfo[PLAYER_AFK][playerid]=false;
if(!Freezed[playerid])TogglePlayerControllable(playerid,true);
return 1;
}

is there a mistake?




Re: AFK with reason - Correlli - 28.08.2009

Is it hard to compile and try it on server? That's the best way to know if there is a mistake.