Need Help .
#1

Hi guys I just want to make a cmd like this:

pawn Код:
CMD:vh(playerid,params[])
{
    #pragma unused params
    new Float:health, veh,str[64];
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    format(str,sizeof(str),"Truck Health %d",(health/1148846080)*100);
    SendClientMessage(playerid,GREEN,str);
    return 1;
}
But its not giving right ans I known I am doing wrong way pls help how to do this. I div health by 1148846080 cuz Its giving me this val of health on New truck(no damage... )
Reply
#2

Bump... Any one...
Reply
#3

why the hell (health/1148846080)*100? just do health its suppose to work...
i wouldn't use float but if you do...
and you have to change the %d to %f cuz %d = integer %f = float
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)