I can /purchase everywhere
#1

Hi, i can use the /purchase command everywhere, anyone know what is wrong?

pawn Код:
if(strcmp(cmd, "/purchase", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!(PlayerInfo[playerid][pDonatorLevel] == 3))
                return SendClientMessage(playerid, COLOR_WHITE, "   You are not a Gold VIP!");
            if(!IsAtGunShop(playerid) && GetPlayerVirtualWorld(playerid) == 2)
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not in the VIP Club/Black Market.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                ShowPlayerDialog(playerid, VIPMARKET, DIALOG_STYLE_TABLIST_HEADERS, "Gold Blackmarket",
                "Weapon\tPrice\n\
                Deagle\t{00BC2E}$12,000{FFFFFF}\n\
                M4\t{00BC2E}$20,000{FFFFFF}\n\
                Spas12\t{00BC2E}$70,000{FFFFFF}\n\
                Sniper\t{00BC2E}$65,000{FFFFFF}\n\
                Knife\t{00BC2E}$500,000{FFFFFF}"
,
                "Purchase", "Cancel");
                return 1;
            }
        }
        return 1;
    }
Reply
#2

PHP код:
if(!IsAtGunShop(playerid) && GetPlayerVirtualWorld(playerid) == 2
This is vague. If you want a NAND construct it should be like so (note brackets).

PHP код:
if(!(IsAtGunShop(playerid) && GetPlayerVirtualWorld(playerid) == 2)) 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)