Weapon dialog help
#1

^^^^^^^^
Reply
#2

Where you have defined:

- WEAPON_CHAINSAW
- WEAPON_GRENADE
- WEAPON_TEARGAS

Uh?
Reply
#3

^^^^^^^^
Reply
#4

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

Put

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

^^^^^^^^
Reply
#7

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...
Reply
#8

^^^^^^^^
Reply
#9

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

pawn Код:
#define DIALOG_WEAPONS 544
Reply
#10

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;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)