Command not working.
#1

This command is not working.

pawn Код:
COMMAND:ilegalshop(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,5.0,2152.6980,-2270.7324,13.3088))
    {
        if(GetPVarInt(playerid, "Member") >= 8)
        {
            if(GetPlayerVirtualWorld(playerid) == GetPVarInt(playerid, "Member"))
            {
                if(FactionInfo[GetPVarInt(playerid, "Member")][fDrugs] >= 1 && FactionInfo[GetPVarInt(playerid, "Member")][fWep] >= 1)
                {
                    ShowPlayerDialog(playerid,141,DIALOG_STYLE_LIST,"Factory - Choice","Weaponary\nNarcotics","Choose", "Exit");
                }
                else
                {
                    new gunname[20], string2[256];
                    switch(FactionInfo[GetPVarInt(playerid, "Member")][fWep])
                    {
                        case 1:
                        {
                            for(new h = 0; h < sizeof(FactoryMenu); h++)
                            {
                                GetWeaponName(FactoryMenu[h][0], gunname, sizeof(gunname));
                                if(FactoryMenu[h][0] == 100) gunname="Kevlar";
                                if(h == 0)
                                {
                                    format(string2, 256, "%s - $%d", gunname, FactoryMenu[h][1]);
                                }
                                else
                                {
                                    format(string2, 256, "%s\n%s - $%d", string2, gunname, FactoryMenu[h][1]);
                                }
                            }
                            ShowPlayerDialog(playerid,106,DIALOG_STYLE_LIST,"Factory - Create Weapon",string2,"Create", "Exit");
                        }
                        case 2:
                        {
                            if(GetPVarInt(playerid, "Rank") != 6) return true;
                            for(new h = 0; h < sizeof(FactoryMenuEx); h++)
                            {
                                GetWeaponName(FactoryMenuEx[h][0], gunname, sizeof(gunname));
                                if(FactoryMenuEx[h][0] == 100) gunname="Kevlar";
                                if(h == 0)
                                {
                                    format(string2, 256, "%s - $%d", gunname, FactoryMenuEx[h][1]);
                                }
                                else
                                {
                                    format(string2, 256, "%s\n%s - $%d", string2, gunname, FactoryMenuEx[h][1]);
                                }
                            }
                            ShowPlayerDialog(playerid,134,DIALOG_STYLE_LIST,"Factory - Create Weapon",string2,"Create", "Exit");
                        }
                    }
                if(FactionInfo[GetPVarInt(playerid, "Member")][fDrugs] >= 1) ShowPlayerDialog(playerid,116,DIALOG_STYLE_LIST,"Factory - Drugs","Purchase Seeds $100\nPurchase Cocaine (INFO)\nCombine Crack (INFO)","Create", "Exit");
                return 1;
                }
            }
        }
    }
    return 1;
}
Anyone have a solution?
Thanks for the helpers.
Reply
#2

What do you mean by it doesn't work ?
Reply
#3

Quote:
Originally Posted by Clad
Посмотреть сообщение
What do you mean by it doesn't work ?
There is no error but when I type the command in game its just doesnt do nothing
Reply
#4

you are checking players VW with his Member rank ??
if(GetPlayerVirtualWorld(playerid) == GetPVarInt(playerid, "Member"))
Why ?
it should be like this
if(GetPlayerVirtualWorld(playerid) == YourShopsVW)
Maybe
Reply
#5

Working Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)