public LuX_SpeedoMeterUp()
{
new Float:LPosX;
new Float:LPosY;
new Float:LPosZ;
new Float:PlayerSpeedDistance;
new value;
new Float:L_VehHealth;
new LVehicleStatus[15];
for(new i=0; i<PLAYERS; i++)
{
if(VehicleStatus[GetPlayerVehicleID(i)] == 1)
{
LVehicleStatus = "~r~Locked";
}
else
{
LVehicleStatus = "~g~Unlocked";
}
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, LPosX, LPosY, LPosZ);
GetPlayerVehicleID(i);
GetVehicleHealth(GetPlayerVehicleID(i), L_VehHealth);
PlayerSpeedDistance = floatsqroot(floatpower(floatabs(floatsub(LPosX,LuX_ReadPlayerPosition[i][ReadX])),2)+floatpower(floatabs(floatsub(LPosY,LuX_ReadPlayerPosition[i][ReadY])),2)+floatpower(floatabs(floatsub(LPosZ,LuX_ReadPlayerPosition[i][ReadZ])),2));
value = floatround(PlayerSpeedDistance * 5000);
new LuxZone[MAX_ZONE_NAME];
GetPlayer2DZone(i, LuxZone, MAX_ZONE_NAME);
if(LuX_SpeedoMeter[i] == 0){
TextDrawShowForPlayer(i, LBox[i]);
TextDrawShowForPlayer(i, LLine1[i]);
TextDrawShowForPlayer(i, LLine2[i]);
TextDrawShowForPlayer(i, LLine3[i]);
TextDrawShowForPlayer(i, LLine4[i]);
TextDrawShowForPlayer(i, LCredits[i]);
TextDrawShowForPlayer(i, Lmph[i]);
TextDrawShowForPlayer(i, LFunc[i]);
LuX_SpeedoMeter[i] = 1; }
new LKPH = floatround(value/1000);
format(lstring,sizeof(lstring),"~b~Fahrzeug: ~w~%s~n~~b~Leben: ~w~%.2f~n~~b~Hoehe: ~w~%.1f~n~~b~Gps: ~w~%s~n~~b~Tank: %i",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth,LPosZ,LuxZone,CallRemoteFunction("Gas","i",GetPlayerVehicleID(i)));
TextDrawSetString(LFunc[i], lstring);
format(lstr,sizeof(lstr),"%sKM/H: ~w~%d",MPH_KPH_Color,LKPH);
TextDrawSetString(Lmph[i], lstr);
if(L_VehHealth <= 500){
format(lstring,sizeof(lstring),"%sFahrzeug: ~w~%s~n~%sLeben: ~w~~r~%.2f~n~%sHoehe: ~w~%.1f~n~%sGps: ~w~%s",CategoriesColor,LVehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],CategoriesColor,L_VehHealth,CategoriesColor,LPosZ,CategoriesColor,LuxZone);
TextDrawSetString(LFunc[i], lstring);
}
/*if(LKPH >= VehicleMaxSpeed)
{
TogglePlayerControllable(i,0);
format(lstr,sizeof(lstr),"~g~KM/H: ~r~%d",LKPH);
TextDrawSetString(Lmph[i], lstr);
}*/
}
LuX_ReadPlayerPosition[i][ReadX] = LPosX, LuX_ReadPlayerPosition[i][ReadY] = LPosY, LuX_ReadPlayerPosition[i][ReadZ] = LPosZ;}
for(new i=0; i<PLAYERS; i++){
if(!IsPlayerInAnyVehicle(i)){
TextDrawHideForPlayer(i, LBox[i]);
TextDrawHideForPlayer(i, LLine1[i]);
TextDrawHideForPlayer(i, LLine2[i]);
TextDrawHideForPlayer(i, LLine3[i]);
TextDrawHideForPlayer(i, LLine4[i]);
TextDrawHideForPlayer(i, LCredits[i]);
TextDrawHideForPlayer(i, Lmph[i]);
TextDrawHideForPlayer(i, LFunc[i]);
LuX_SpeedoMeter[i] = 0;
}
}
return 1;
}