OnPlayerPickUpPickup Problem
#1

Hi, I need help with this..

Код:
if(pickupid == meatDrops)
	{
	   	if(team[playerid] == TEAM_HUMAN)
	   	{
			if(pInfo[playerid][pHumanClass] == ENGINEER || pInfo[playerid][pHumanClass] == VIPENGINEER || pInfo[playerid][pHumanClass] == BUSINESSHUMAN || pInfo[playerid][pHumanClass] == SCAVENGER)
			{
				switch(pInfo[playerid][pHumanClass])
				{
			    	case SCAVENGER:
					{
						new ammo = GetPlayerAmmo(playerid);
						new Float:armor;
						GetPlayerArmour(playerid,armor);
						SetPlayerArmour(playerid, armor+5);
						SetPlayerAmmo(playerid, GetPlayerWeapon(playerid), ammo+15);
				 		GameTextForPlayer(playerid, "~g~Found~w~: Armour and Ammo",4000,5);
				 		DestroyPickup(meatDrops);
					}
			    	case ENGINEER: pInfo[playerid][Boxes]++,GameTextForPlayer(playerid,"~g~Found~w~: 1 Box",4000,5),DestroyPickup(meatDrops);
					case VIPENGINEER: pInfo[playerid][pVipBoxes] += 3,GameTextForPlayer(playerid,"~g~Found~w~: 3 Boxes",4000,5),DestroyPickup(meatDrops);
					case BUSINESSHUMAN: pInfo[playerid][pXP] += 10*2,GameTextForPlayer(playerid,"~g~Found~w~ xp",4000,5),DestroyPickup(meatDrops);
				}
			}
			else
			{
				if(pInfo[playerid][IsPlayerInfected] == 0)
				{
					new slot, weap, ammo;
					for ( slot = 0; slot < 14; slot++ )
					{
						GetPlayerWeaponData(playerid,slot,weap,ammo);
						if(IsValidWeapon(weap))
						{
							new randomselect = random(2);
							switch(randomselect)
							{
								case 0:
								{
									new randomammo = random(50);
									ServerWeapon(playerid,weap,randomammo);
									format(string,sizeof(string),"~g~Found~w~: %d ammo",randomammo);
									GameTextForPlayer(playerid,string,4000,5);
									DestroyPickup(meatDrops);
								}
								case 1:
								{
									new randomxp = random(35);
									format(string,sizeof(string),"~g~Found~w~: %d XP",randomxp);
									GameTextForPlayer(playerid,string,4000,5);
									pInfo[playerid][pXP] += randomxp;
									DestroyPickup(meatDrops);
								}
							}
						}
					}
				}
			}
		}
	}
	else if(pickupid == fakeDrops)
	{
		if(team[playerid] == TEAM_HUMAN)
 		{
			InfectPlayerStandard(playerid);
			DestroyPickup(fakeDrops);
		}
	}
That "meatDrops" should only gives ammo, boxes, ladders, etc. That "fakeDrops" should only gives Infections.

But when I go ingame, once I pick fakeDrops, it gives me ammo, boxes, ladders, etc too. Even when I pick meatDrops, it also gives me ammo, boxes, ladders, etc too.

Help me with this. Thanks.

Additionally: These fakeDrops and meatDrops appears when a player dies. Here's their info.
Код:
fakeDrops = CreatePickup(2804,19,Float:x,Float:y,Float:z);
Код:
meatDrops = CreatePickup(2805,19,Float:x,Float:y,Float:z);
Reply


Messages In This Thread
OnPlayerPickUpPickup Problem - by Istrator - 29.06.2018, 12:43
Re: OnPlayerPickUpPickup Problem - by Istrator - 01.07.2018, 09:15
Re: OnPlayerPickUpPickup Problem - by JasonRiggs - 01.07.2018, 09:44
Re: OnPlayerPickUpPickup Problem - by Istrator - 01.07.2018, 12:38
Re: OnPlayerPickUpPickup Problem - by TadePoleMG - 01.07.2018, 12:41
Re: OnPlayerPickUpPickup Problem - by Istrator - 02.07.2018, 15:22
Re: OnPlayerPickUpPickup Problem - by Istrator - 03.07.2018, 15:31
Re: OnPlayerPickUpPickup Problem - by Neom - 03.07.2018, 17:29
Re: OnPlayerPickUpPickup Problem - by Exhibit - 04.07.2018, 00:05
Re: OnPlayerPickUpPickup Problem - by Istrator - 06.07.2018, 11:31

Forum Jump:


Users browsing this thread: 1 Guest(s)