What is wrong in that command
#1

if(strcmp(cmd, "/pay", true) == 0)
{
if(IsPlayerConnected(playerid) && (boxevent == 0) && if (PlayerInfo[playerid][pAdmin] >= 1337
{
boxevent = 1;
BroadCast(COLOR_GREEN, " ***************!");
}
else if(IsPlayerConnected(playerid) && (boxevent == 1) && IsPlayerAdmin(playerid))
{
boxevent = 0;
BroadCast(COLOR_GREEN, " ******************.");
}
return 1;
}
Reply
#2

someone ?
Reply
#3

can you explain what's the problem with the command?
Reply
#4

I think that you forgot some brackets, anyway try this one,

pawn Код:
if(strcmp(cmd, "/pay", true) == 0)
{
    if(IsPlayerConnected(playerid) && (boxevent == 0) && if (PlayerInfo[playerid][pAdmin] >= 1337))
    {
        boxevent = 1;
        BroadCast(COLOR_GREEN, " ***************!");
    }
    else if(IsPlayerConnected(playerid) && (boxevent == 1))
    {
        if(IsPlayerAdmin(playerid))
        {
            boxevent = 0;
            BroadCast(COLOR_GREEN, " ******************.");
        }
    }
    return 1;
}
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/pay", true) == 0) {
        if(IsPlayerConnected(playerid) ) {
            if (boxevent == 0 && PlayerInfo[playerid][pAdmin] >= 1337) {
                boxevent = 1;
                BroadCast(COLOR_GREEN, " ***************!");
            }
            else if(boxevent == 1 && IsPlayerAdmin(playerid)) {
                boxevent = 0;
                BroadCast(COLOR_GREEN, " ******************.");
            }
        }
        return 1;
    }
    // Rest
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)