Creating a Pickup... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Creating a Pickup... (
/showthread.php?tid=83706)
Creating a Pickup... -
Abernethy - 26.06.2009
Hey guys.
I was wondering, if I could make a certain pickup have a effect. I already know how to do this, but I hit a key on the Pizza Boy (I already have made this) & it spawns a Pizza using
pawn Код:
CreatePickup(2220, 15, x, y-3, z);
. I want your HP to be set to 100 when you enter it.. anybody have a clue how to make this?
Re: Creating a Pickup... -
Grim_ - 26.06.2009
pawn Код:
//top of script
new PizzaPickup;
//the key hit
PizzaPickup; = CreatePickup(...);
//OnPlayerPickUpPickup
if(pickupid == PizzaPickup)
{
 SetPlayerHealth(playerid, 100);
}
Re: Creating a Pickup... -
Correlli - 26.06.2009
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
This callback will be called when you enter any pickup added in script. Check if you are in the correct pickup, and if you are then just set your HP.
Re: Creating a Pickup... -
Abernethy - 26.06.2009
Like I said, I already now how to use OnPlayerPickupPickup. No need to post, so you're saying I have to make the object 2220 & all objects with the ID 2220 will have the same effect?
Re: Creating a Pickup... -
Grim_ - 27.06.2009
They're pickups, not objects