Dialog Problem
#1

Код:
	else if(dialogid == Private_Name)
	{
	    if(response)
	    {
	        if(PlayerInfo[playerid][pConnectHours] < 2 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");
			new CrateID = GetPVarInt(playerid, "CrateGuns_CID");
			switch(listitem)
			{ //Desert Eagle\nSPAS-12\nMP5\nM4A1\nAK-47\nSniper Rifle\nShotgun
				/*
			    Deagle - 4
				Spas - 8
				AK-47 - 5
				M4    - 6
				Sniper Rifle - 5
				MP5 - 5
				*/

			    case 0: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 24, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 1: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 27, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 2: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 29, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 3: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 31, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 4: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 30, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 5: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 34, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 6: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 25, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
			}
			format(string, sizeof(string), "Serial Number: %d\nCapacity: %d/50", CrateID, CrateInfo[CrateID][GunQuantity]);
			UpdateDynamic3DTextLabelText(CrateInfo[CrateID][crLabel], COLOR_ORANGE, string);
	    }

And if I remove this lines thats compile with errors :

Код:
			new CrateID = GetPVarInt(playerid, "CrateGuns_CID");
			switch(listitem)
When I try compile it the Pawno is stuck... WhY!?
Reply
#2

Did you define the Private_Name dialog?
Reply
#3

Yeah
Reply
#4

don't remove
Код:
switch(listitem)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)