[HELP] Adding health to player
#1

How to add health to player? Not set (SetPlayerHealth), but add...
Reply
#2

new Float:health;
GetPlayerHealth(playerid,health)
SetPlayerHealth(playerid, health+the ammount you wanna add);
Reply
#3

pawn Код:
public AddPlayerHealth( playerid, Float:Amount )
{
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    SetPlayerHealth (playerid, Health + Amount);
    return floatround(Health + Amount);
}
+ Add forward to that.
Reply
#4

Thanks guys
Reply
#5

Quote:
Originally Posted by TheXIII
Посмотреть сообщение
pawn Код:
public AddPlayerHealth( playerid, Float:Amount )
{
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    SetPlayerHealth (playerid, Health + Amount);
    return floatround(Health + Amount);
}
+ Add forward to that.
Why not use an stock? would be the same .. though you can't add an timer to an stock.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)