Simple system help
#2

pawn Код:
new Pafk = 0;

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/afk", cmdtext, true, 10) == 0)
    {
        if(Pafk == 1)
        {
            SendClientMessage(playerid, 0xEFEFF7AA, "ERROR: Already AFK");
        }
        else if(Pafk == 0)
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "You are now AFK");
            Pafk == 1;
        }
        return 1;
    }
    if (strcmp("/back", cmdtext, true, 10) == 0)
    {
        if(Pafk == 0)
        {
            SendClientMessage(playerid, 0xEFEFF7AA, "ERROR: You are not AFK");
        }
        else if(Pafk == 1)
        {
            Pafk == 0;
            SendClientMessage(playerid, 0xFFFFFFFF, "You are now back");
        }
        return 1;
    }
    return 0;
}

public OnPlayerDisconnect(playerid)
{
    Pafk = 0;
    return 1;
}
Reply


Messages In This Thread
Simple system help - by Juan_Viz - 26.10.2012, 18:02
Re: Simple system help - by V1ceC1ty - 26.10.2012, 18:15
Re : Re: Simple system help - by lelemaster - 26.10.2012, 18:52
Re: Re : Re: Simple system help - by V1ceC1ty - 26.10.2012, 19:10
Respuesta: Simple system help - by Juan_Viz - 26.10.2012, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)