07.09.2013, 15:58
It seems that it's either because of sscanf or SetPlayerHealth function.
I just did a test in an empty gamemode and the result is:
When I set the health to 400 before.
I just did a test in an empty gamemode and the result is:
pawn Код:
Health: 144.000000
pawn Код:
CMD:health( playerid, params[ ] )
{
new
Float: health_
;
if( !sscanf( params, "f", health_ ) ) SetPlayerHealth( playerid, health_ );
return 1;
}
CMD:gethealth( playerid, params[ ] )
{
new
Float: health_
;
GetPlayerHealth( playerid, health_ );
printf( "Health: %f", health_ );
return 1;
}