Pickup Problem
#1

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == TEST1)
	{
		//CODE
		//CODE
		//CODE
		//CODE
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
	}
	if(pickupid == TEST2)
	{
		//CODE
		//CODE
		//CODE
		//CODE
		GivePlayerWeapon(playerid, 34,15);
	}
	return 1;
}


Whats wrong here ? If i pick the pickupid "TEST2" i get both pickpups together (also giveplayerweapon and applyanimation)
Reply
#2

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == TEST1)
	{
		//CODE
		//CODE
		//CODE
		//CODE
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
	}
	else if(pickupid == TEST2)
	{
		//CODE
		//CODE
		//CODE
		//CODE
		GivePlayerWeapon(playerid, 34,15);
	}
	return 1;
}
Reply
#3

dont works same problem
Reply
#4

Show the code where you create the pickup
Reply
#5

Check the pickup position,maybe is in same position.
Reply
#6

edit: it gives now only pickupid "TEST1" but it should give pickup id "TEST2"

yes its same position ? but there comes a pickup at different times with a timer (in 1min comes test1 then after 3 mins test2 comes)
Reply
#7

There is the problem,if is in same position will call and Test1 and Test2 when you are into it,you need different position for them.
Edit:
You have something like a timer to show the pickup?
You need to destroy it when another pickup is showing.
Reply
#8

Changed the positions its still the same all works fine but it only gives the wrong pickupid if i go on the pickup
Reply
#9

Show the createpickup lines.
Reply
#10

Becouse you didn`t set it right.
When Test1 is shown destroy the Test2 and when Test2 is shown,destroy Test1.
Show me some codes if you can`t do it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)