OnPlayerCommandReceived help
#1

pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{

    if(PlayerInfo[ playerid ][ isAFK ] == 1 && (!strcmp(cmdtext,"/back",true) || !strcmp(cmdtext,"/unjail",true) || !strcmp(cmdtext,"/uncage",true)))
    {
        SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"You are Now in AFK/BRB Mode! Try /back to use this cmd!");
        return 0;
    }
    if(Jailed[playerid] == 1 && (!strcmp(cmdtext,"/unjail",true) || !strcmp(cmdtext,"/back",true) || !strcmp(cmdtext,"/uncage",true)))
    {
        SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"you cannot use any command while being jailed!");
        return 0;
    }
    if(Caged[playerid] == 1 && (!strcmp(cmdtext,"/uncage",true) || !strcmp(cmdtext,"/back",true) || !strcmp(cmdtext,"/unjail",true)))
    {
        SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"you cannot use any command while being caged!");
        return 0;
    }
    return 1;
}

Actually this commands should work when PlayerInfo[ playerid ][ isAFK ] == 1 (or) Jailed[playerid] == 1 (or) Caged[playerid] == 1 but they arent working...
they are simply showing error message
Reply
#2

SOLVED..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)