Float doesn't work for more than 250
#4

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:
pawn Код:
Health: 144.000000
When I set the health to 400 before.

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;
}
Reply


Messages In This Thread
Float doesn't work for more than 250 - by Tomer!.$ - 07.09.2013, 15:38
Re: Float doesn't work for more than 250 - by damian123 - 07.09.2013, 15:45
Re: Float doesn't work for more than 250 - by Tomer!.$ - 07.09.2013, 15:50
Re: Float doesn't work for more than 250 - by Konstantinos - 07.09.2013, 15:58
Re: Float doesn't work for more than 250 - by Tomer!.$ - 07.09.2013, 16:00
Re: Float doesn't work for more than 250 - by Konstantinos - 07.09.2013, 16:02
Re: Float doesn't work for more than 250 - by Tomer!.$ - 07.09.2013, 16:04
Re: Float doesn't work for more than 250 - by Dragonsaurus - 07.09.2013, 16:06
Re: Float doesn't work for more than 250 - by Konstantinos - 07.09.2013, 16:06
Re: Float doesn't work for more than 250 - by Tomer!.$ - 07.09.2013, 16:07

Forum Jump:


Users browsing this thread: 1 Guest(s)