Health - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Health (
/showthread.php?tid=147148)
Health -
ViruZZzZ_ChiLLL - 10.05.2010
Question :
Okay, so how can I add health instead of just setting it to a player??
Problem :
I don't know how to do it
Re: Health -
[MWR]Blood - 10.05.2010
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Question :
Okay, so how can I add health instead of just setting it to a player??
Problem :
I don't know how to do it 
|
pawn Код:
new Float:Health;
SetPlayerHealth(playerid,GetPlayerHealth(playerid,Float:Health)+100);
Re: Health -
ViruZZzZ_ChiLLL - 10.05.2010
Quote:
Originally Posted by ikarus❶❸❸❼
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Question :
Okay, so how can I add health instead of just setting it to a player??
Problem :
I don't know how to do it 
|
pawn Код:
SetPlayerHealth(GetPlayerHealth(playerid)100);
|
thanks :P I have been really confused with this simple thing

Err...
warning 202: number of arguments does not match definition
Re: Health -
[MWR]Blood - 10.05.2010
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Quote:
Originally Posted by ikarus❶❸❸❼
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Question :
Okay, so how can I add health instead of just setting it to a player??
Problem :
I don't know how to do it 
|
pawn Код:
SetPlayerHealth(GetPlayerHealth(playerid)100);
|
thanks :P I have been really confused with this simple thing 
Err... warning 202: number of arguments does not match definition
|
Look at my previous post, I edited it
Re: Health -
Zamaroht - 10.05.2010
pawn Код:
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health + 10);
That will add him 10 health.
Re: Health -
ViruZZzZ_ChiLLL - 10.05.2010
Quote:
Originally Posted by ikarus❶❸❸❼
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Quote:
Originally Posted by ikarus❶❸❸❼
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Question :
Okay, so how can I add health instead of just setting it to a player??
Problem :
I don't know how to do it 
|
pawn Код:
SetPlayerHealth(GetPlayerHealth(playerid)100);
|
thanks :P I have been really confused with this simple thing 
Err... warning 202: number of arguments does not match definition
|
Look at my previous post, I edited it
|
Quote:
Originally Posted by Zamaroht
pawn Код:
new Float:health; GetPlayerHealth(playerid, health); SetPlayerHealth(playerid, health + 10);
That will add him 10 health.
|
Okay, works now, thanks