Vehiclehealth
#1

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[100];
    new Float:health;
    new Carhp = GetVehicleHealth(vehicleid,health);
    format(string,sizeof(string), "You entering a vehicle with HP: %d.",Carhp);
    SendClientMessage(playerid,BLUE,string);

    return 1;
}
It's only show: You entering a vehicle with HP: 1.
How to make like it shows 1000.0 or something?
Reply
#2

use %f
Reply
#3

Quote:
Originally Posted by RaFsTar[PT
]
use %f
It's show now: 0.00000 on a car with 100 percent no damages.
Reply
#4

hi,

the value is stored in the variable health, the function only returns 1 because it has been sucessfully executed

++Sim++
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)