About SetPlayerHeath
#1

Can someone remind me the code to give a player "+" health and not just set it.
Like SetPlayerHealth(playerid,20+); something like that but it is not not that.

Can you remind me of the correct code.
Reply
#2

You must create a new float variable to store the players health you want to edit like this:
Код:
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health + 20.0);
Reply
#3

pawn Код:
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health+20); //Set 20 to what else you want if you don't want 20.
//For Taking health...
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health-20); //Set to to what else you want if you don't want 20.
Reply
#4

Thanks, it was that simple, i did not remember. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)