Percentage (+rep) - 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)
+--- Thread: Percentage (+rep) (
/showthread.php?tid=503404)
Percentage (+rep) -
ScripteRMKD - 29.03.2014
Hi Scripterzzz.Again I
How are you all ?
I need help scripterz.
I get LuX Speedometer and vehicle health is ex. 1000.00 how can i make it from 1000.0 to 100%? with percentage
Re: Percentage (+rep) -
DexterC - 29.03.2014
Change the health part to %.0f%
Re: Percentage (+rep) -
ScripteRMKD - 29.03.2014
Now is 1000 only without % and i want 100 not 1000
Re: Percentage (+rep) -
EiresJason - 29.03.2014
Use this:
https://sampwiki.blast.hk/wiki/Format.
Re: Percentage (+rep) -
ScripteRMKD - 29.03.2014
i dont know how to make it can you make it ??
pawn Код:
format(lstring,sizeof(lstring),"~b~Vozilo: ~w~%s~n~~b~Jacina: ~w~%0.f%~n~~b~Gorivo: ~w~%d litri~n~~b~KM: ~w~1~n~~g~Registrirano~n~~b~Lokacija GPS: ~n~~w~%s",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth,Gas[GetPlayerVehicleID(i)],LuxZone);
TextDrawSetString(LFunc[i], lstring);
Re: Percentage (+rep) -
Goobiiify - 29.03.2014
With some basic math you will be able to fix it yourself; For example 1000 / 10 = 100.
Код:
new vhealth;
GetVehicleHealth(vehicleid, vhealth);
vhealth = (vhealth/10);
Re: Percentage (+rep) -
ScripteRMKD - 29.03.2014
can anyone make it ?
pawn Код:
format(lstring,sizeof(lstring),"~b~Vozilo: ~w~%s~n~~b~Jacina: ~w~%0.f%~n~~b~Gorivo: ~w~%d litri~n~~b~KM: ~w~1~n~~g~Registrirano~n~~b~Lokacija GPS: ~n~~w~%s",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth,Gas[GetPlayerVehicleID(i)],LuxZone);
TextDrawSetString(LFunc[i], lstring);
Re: Percentage (+rep) -
ScripteRMKD - 29.03.2014
help
Re: Percentage (+rep) -
CroM256 - 29.03.2014
Код:
format(lstring,sizeof(lstring),"~b~Vozilo: ~w~%s~n~~b~Jacina: ~w~%f%~n~~b~Gorivo: ~w~%d litri~n~~b~KM: ~w~1~n~~g~Registrirano~n~~b~Lokacija GPS: ~n~~w~%s",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth/10,Gas[GetPlayerVehicleID(i)],LuxZone);
I think this should work, but I am not sure.
Re: Percentage (+rep) -
ScripteRMKD - 29.03.2014
not working