OnPlayerPickUpPickup
#1

Hello i'm creating 4 heart pickup

the 2 heart pickup will spawn at Glenn Park's Hospital
the 2 heart pickup left will spawn at Vinewood's Hospital

i have already create one with pickup types 15 which is pickable and will respawn after death

So here is the question is it possible if player has 100 health he cannot pick the heart pickup anymore?
Like in GTA III?
Reply
#2

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    new Float:health;
    GetPlayerHealth(playerid, health);
    if(pickupid == *yourpickuphere* && health > 100) return 0;
    return 1;
}
Try it
Reply
#3

Thanks bud it work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)