Pickup Types
#1

I want to make a health pickup that gives 99.0 HP instead of 100.0 HP. What pickup type do I use that requires OnPlayerPickUpPickup and respawns after death? (Like Pickup Type 3 but doesn't give HP when a player pickups an HP model)

Any ideas?
Reply
#2

pawn Код:
new healthpickup;
public OnGameModeInit()
{
    healthpickup = CreatePickup(1240, 3, x, y, z, -1);
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == healthpickup)
    {
        SetPlayerHealth(playerid,99);
    }
    return 1;
}
Reply
#3

Will doing that not set the HP to 100? Because normally, if the pickup type is 3 and the pickup model is the health, it gives 100 HP.
Reply
#4

Use pickup type 1... does anyone read the wiki these days?
Reply
#5

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Use pickup type 1... does anyone read the wiki these days?
You can also use this cool tool for quick access as well. It has descriptions that will help you in the future. https://sampforum.blast.hk/showthread.php?tid=35399
Reply
#6

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Use pickup type 1... does anyone read the wiki these days?
Alright thanks, I was doubting the wiki.

Solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)