SA-MP Forums Archive
Hmph Warning! - 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: Hmph Warning! (/showthread.php?tid=236994)



Hmph Warning! - cloudysky - 08.03.2011

pawn Код:
warning 215: expression has no effect
pawn Код:
Player[playerid][Afk] >= 0;
And the whole command

pawn Код:
command(back, playerid, params[])
{
    if(Player[playerid][Afk] >= 0)
    {
        SendClientMessage(playerid, ORANGE, "Hint: You have to be AFK to use /back!" );
    }
    else
    {
        if(Player[playerid][Afk] >= 1)
        {
            SendClientMessage(playerid, CYAN, "Welcome back." );
            TogglePlayerControllable(playerid, 1);
            Delete3DTextLabel(label[playerid]);
            Player[playerid][Afk] >= 0; //warning line here
        }
    }
    return 1;
}



Re: Hmph Warning! - MadeMan - 08.03.2011

pawn Код:
command(back, playerid, params[])
{
    if(Player[playerid][Afk] == 0)
    {
        SendClientMessage(playerid, ORANGE, "Hint: You have to be AFK to use /back!" );
    }
    else
    {
        if(Player[playerid][Afk] == 1)
        {
            SendClientMessage(playerid, CYAN, "Welcome back." );
            TogglePlayerControllable(playerid, 1);
            Delete3DTextLabel(label[playerid]);
            Player[playerid][Afk] = 0;
        }
    }
    return 1;
}



Re: Hmph Warning! - cloudysky - 08.03.2011

Ah lol. Thanks