SA-MP Forums Archive
Weapon dialog help - 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: Weapon dialog help (/showthread.php?tid=418487)



Weapon dialog help - Ananisiki - 24.02.2013

^^^^^^^^


Respuesta: Weapon dialog help - CrossOv3r - 24.02.2013

Where you have defined:

- WEAPON_CHAINSAW
- WEAPON_GRENADE
- WEAPON_TEARGAS

Uh?


Re: Weapon dialog help - Ananisiki - 25.02.2013

^^^^^^^^


Re: Weapon dialog help - Lemonaidz - 25.02.2013

Mabye try - https://sampforum.blast.hk/showthread.php?tid=113777


Respuesta: Weapon dialog help - CrossOv3r - 25.02.2013

Put

pawn Код:
#define WEAPON_CHAINSAW 9
in the top of your gamemode, try to buy a Chainsaw and toll me what happens...


Re: Weapon dialog help - Ananisiki - 25.02.2013

^^^^^^^^


Respuesta: Re: Weapon dialog help - CrossOv3r - 25.02.2013

Quote:
Originally Posted by Ananisiki
Посмотреть сообщение
WeaponDialog.pwn(10) : warning 201: redefinition of constant/macro (symbol "WEAPON_CHAINSAW")
їWhere have you defined the WEAPON_CHAINSAW?, that warning its because you already have defined it...

EDIT:

Then just change the line
pawn Код:
GivePlayerWeapon(playerid, WEAPON_CHAINSAW , 1);
for:

pawn Код:
GivePlayerWeapon(playerid, 6 , 1);
Try to buy it the gun then...


Re: Weapon dialog help - Ananisiki - 25.02.2013

^^^^^^^^


Respuesta: Weapon dialog help - CrossOv3r - 25.02.2013

Hmmm.... maybe the ID of the dialog its wrong, reemplace it for this:

pawn Код:
#define DIALOG_WEAPONS 544



Re: Weapon dialog help - MattSlater - 25.02.2013

Lol..

pawn Код:
if(dialogid == DIALOG_WEAPONS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                GivePlayerWeapon(playerid, WEAPON_CHAINSAW, 1);
            }
            if(listitem == 1)
            {
                GivePlayerWeapon(playerid, WEAPON_GRENADE, 99999);
            }
            if(listitem == 2)
            {
                GivePlayerWeapon(playerid, WEAPON_TEARGAS, 99999);
            }
            if(listitem == 3)
            {
                GivePlayerWeapon(playerid, WEAPON_MOLTOV, 99999);
            }
            if(listitem == 4)
            {
                GivePlayerWeapon(playerid, WEAPON_COLT45, 99999);
            }
            if(listitem == 5)
            {
                GivePlayerWeapon(playerid, WEAPON_SILENCED, 99999);
            }
            if(listitem == 6)
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999);
            }
            if(listitem == 7)
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 99999);
            }
            if(listitem == 8)
            {
                GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 99999);
            }
            if(listitem == 9)
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 99999);
            }
            if(listitem == 10)
            {
                GivePlayerWeapon(playerid, WEAPON_UZI, 99999);
            }
            if(listitem == 11)
            {
                GivePlayerWeapon(playerid, WEAPON_MP5, 99999);
            }
            if(listitem == 12)
            {
                GivePlayerWeapon(playerid, WEAPON_AK47, 99999);
            }
            if(listitem == 13)
            {
                GivePlayerWeapon(playerid, WEAPON_M4, 99999);
            }
            if(listitem == 14)
            {
                GivePlayerWeapon(playerid, WEAPON_TEC9, 99999);
            }
            if(listitem == 15)
            {
                GivePlayerWeapon(playerid, WEAPON_RIFLE, 99999);
            }
            if(listitem == 16)
            {
                GivePlayerWeapon(playerid, WEAPON_SNIPER, 99999);
            }
            if(listitem == 17)
            {

            }
        }
        return 1;
    }
    /////////// >=            return 0;
}
Change return 0 to return 1;