Percentage (+rep)
#1

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
Reply
#2

Change the health part to %.0f%
Reply
#3

Now is 1000 only without % and i want 100 not 1000
Reply
#4

Use this: https://sampwiki.blast.hk/wiki/Format.
Reply
#5

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);
Reply
#6

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);
Reply
#7

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);
Reply
#8

help
Reply
#9

Код:
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.
Reply
#10

not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)