27.09.2015, 18:00
[FilterScript] Simple Vehicle Speedometer/Health/Vehicle Name
28.09.2015, 16:31
Why you use loop under OnPlayerUpdate..? It's useless because this function have argument (playerid) for each player? This loop can cause lag.
I think your code under OnPlayerUpdate should be:
I think your code under OnPlayerUpdate should be:
Код:
public OnPlayerUpdate(playerid) { if(IsPlayerInAnyVehicle(playerid)) { new vspeed[25]; format(vspeed, sizeof(vspeed), "Speed: ~y~%d ~g~KM/H", GetVehicleSpeed(playerid)); PlayerTextDrawSetString(playerid, VehicleSpeed[playerid], vspeed); new vhealthtd[32], Float:vHealth; GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth); new Float:percentage = (((vHealth - 250.0) / (1000.0 - 250.0)) * 100.0); format(vhealthtd, sizeof(vhealthtd), "Vehicle Health: ~g~%.0f%", percentage); PlayerTextDrawSetString(playerid, VehicleHealth[playerid], vhealthtd); } return 1; }
19.10.2015, 18:01
Amazing script bro +rep
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)