Creating a Pickup...
#1

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?
Reply
#2

pawn Код:
//top of script
new PizzaPickup;

//the key hit
PizzaPickup; = CreatePickup(...);

//OnPlayerPickUpPickup
if(pickupid == PizzaPickup)
{
  SetPlayerHealth(playerid, 100);
}
Reply
#3

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.
Reply
#4

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?
Reply
#5

They're pickups, not objects
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)