SA-MP Forums Archive
Pickup Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pickup Problem (/showthread.php?tid=339462)



Pickup Problem - Jimbo01 - 03.05.2012

Код:
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)


Re: Pickup Problem - TzAkS. - 03.05.2012

Код:
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;
}


AW: Pickup Problem - Jimbo01 - 03.05.2012

dont works same problem


Re: Pickup Problem - PrawkC - 03.05.2012

Show the code where you create the pickup


Re: Pickup Problem - TzAkS. - 03.05.2012

Check the pickup position,maybe is in same position.


AW: Pickup Problem - Jimbo01 - 03.05.2012

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)


Re: Pickup Problem - TzAkS. - 03.05.2012

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.


AW: Pickup Problem - Jimbo01 - 03.05.2012

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


Re: Pickup Problem - Marricio - 03.05.2012

Show the createpickup lines.


Re: Pickup Problem - TzAkS. - 03.05.2012

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.