AFK cmd makes the server restart why
#1

i made an afk command but whenever any player use it, the server crashes and stop working why ?
pawn Код:
CMD:afk(playerid,params[])
{
    #pragma unused params
    if(IsPlayerAdmin(playerid))
    {
        if(PlayerInfo[playerid][Afk] == 0)
        {
            PlayerInfo[playerid][Afk] = 1;
            SetPlayerHealth(playerid,100000);
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid,green,"AFK ON");
            SetPlayerInterior(playerid,6);
            SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
            SetPlayerFacingAngle(playerid,271.3259);
            return SendClientMessageToAll(yellow,"[INFO]:%s is now away from keyboard, you can't reach him!");
        }
        else
        {
            PlayerInfo[playerid][Afk] = 0;
            SetPlayerHealth(playerid,100);
            TogglePlayerControllable(playerid, 1);
            SendClientMessage(playerid,red,"AFK OFF");
        }
        return SendClientMessageToAll(yellow,"[INFO]:%s is not away anymore, now you can reach him!");
    }
    else return SendClientMessage(playerid,red,"ERROR: You must be registered and logged in to use this feature");
}
Reply


Messages In This Thread
AFK cmd makes the server restart why - by KillerStrike23 - 17.01.2016, 23:40
Re: AFK cmd makes the server restart why - by Siman - 18.01.2016, 00:26
Re: AFK cmd makes the server restart why - by Gammix - 18.01.2016, 00:30
Re: AFK cmd makes the server restart why - by KillerStrike23 - 18.01.2016, 01:10

Forum Jump:


Users browsing this thread: 1 Guest(s)