29.12.2012, 17:58
Код:
if(GetPlayerHealth(playerid) > 100000 ) SetPlayerHealth(playerid,100);
Код:
warning 202: number of arguments does not match definition
if(GetPlayerHealth(playerid) > 100000 ) SetPlayerHealth(playerid,100);
warning 202: number of arguments does not match definition
if(GetPlayerHealth(playerid) >= 100000 )
{
SetPlayerHealth(playerid,100);
}
pawn Код:
|
That is not the proper usage of GetPlayerHealth. You must store the value in a float (which is the argument you're missing, hence the warning). If you look at the wiki, https://sampwiki.blast.hk/wiki/GetPlayerHealth, they give you a perfect example of how to use it correctly.
|
That is not the proper usage of GetPlayerHealth. You must store the value in a float (which is the argument you're missing, hence the warning). If you look at the wiki, https://sampwiki.blast.hk/wiki/GetPlayerHealth, they give you a perfect example of how to use it correctly.
|
new Float:health;
GetPlayerHealth(playerid,health);
if (health > 100000)
{
SetPlayerHealth(playerid,100);
}