Dialog won't give player a gun
#1

Ok, So in my script I have a NG locker, I wanted to add more guns and I copied and pasted Mace but replaces the Gun IDS and the List item. I got 0 erros but when I went in game and went to get my new gun it didn't give it, Also there are weapons in between them and I know the List Item is correct 100%

Origional Code
Код:
if(listitem == 0) // Mace
		    {
		        if(PlayerInfo[playerid][pCash] < 0)
				{
					SendClientMessage(playerid, COLOR_GREY, "   You cant afford that !");
					TogglePlayerControllable(playerid,1);
				 	return 1;
			 	}
			 	else
		 		{
				 	GivePlayerWeapon(playerid, 41, 999999);
				 	PlayerInfo[playerid][pGun9] = 41;
				 	TogglePlayerControllable(playerid,1);
			 	}
			}
Code after I edited it
Код:
 if(listitem == 12) //Spistol
			{
			    if(PlayerInfo[playerid][pCash] < 800)
				{
					SendClientMessage(playerid, COLOR_GREY, "   You cant afford that !");
					TogglePlayerControllable(playerid,1);
					return 1;
				}
				else
				{
	        		GivePlayerWeapon(playerid, 23, 999999);
					PlayerInfo[playerid][pGun2] = 23;
	        		TogglePlayerControllable(playerid,1);
        		}
			}
Reply
#2

Mind showing the dialog that lists the weapons, please?
Reply
#3

ShowPlayerDialog(playerid,DIALOG_PG_WEAPONRY,DIALO G_STYLE_LIST,"Weapons","Mace \nNight Stick \nDeagle \nShotgun \nMP5 \nRifle \nM4 \nSpas12 \nSniper \nGrenades \nKevlar \nFirst Aid Kit \nSilenced \nRpg \nHSRocket \nSatchel \nNight Goggles\nThermal Goggles \nTearGas \nKnife ","Purchase","Cancel");

if(dialogid == DIALOG_PG_WEAPONRY) //Weapons
{
if(response)
{
if(listitem == 0) // Mace
Reply
#4

Hmmm, I don't see why its doing that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)