SA-MP Forums Archive
Command not working. - 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)
+--- Thread: Command not working. (/showthread.php?tid=534548)



Command not working. - wakeuptomer - 30.08.2014

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.


Re: Command not working. - Clad - 30.08.2014

What do you mean by it doesn't work ?


Re: Command not working. - wakeuptomer - 30.08.2014

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


Re: Command not working. - Fred1993 - 30.08.2014

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


Re: Command not working. - wakeuptomer - 30.08.2014

Working Thanks.