SA-MP Forums Archive
Need Help . - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help . (/showthread.php?tid=196939)



Need Help . - iRana - 07.12.2010

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... )


Re: Need Help . - iRana - 07.12.2010

Bump... Any one...


Re: Need Help . - XePloiT - 07.12.2010

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