SA-MP Forums Archive
Pickup Types - 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 Types (/showthread.php?tid=519150)



[SOLVED] Pickup Types - Deathlane - 13.06.2014

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?


Re: Pickup Types - SilentSoul - 13.06.2014

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;
}



Re: Pickup Types - Deathlane - 13.06.2014

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.


Re: Pickup Types - Threshold - 13.06.2014

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


Re: Pickup Types - nmader - 13.06.2014

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


Re: Pickup Types - Deathlane - 13.06.2014

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

Solved.