16.01.2012, 17:30
No GM que to usando tinha quando entrava no carro , Gasolinha , Lataria , Velocidade e tals ai editei uns bglh mas nao mexi nisso , mas agora nao aparece mais ... Alguem sabe pq ?
Aqui o Codigo :
Aqui o Codigo :
pawn Код:
public AtualizarVeloVictor(playerid)
{
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]);
TextDrawHideForPlayer(i, rodape[i]);
TextDrawShowForPlayer(i, url[i]);
LuX_SpeedoMeter[i] = 1; }
new LMPH = floatround(value/1280);
new LKPH = floatround(value/800);
new vehicle = GetPlayerVehicleID(i);
format(lstring,sizeof(lstring),"~b~Veiculo: ~w~%s~n~~b~Lataria: ~w~%.2f~n~~b~Altitude: ~w~%.1f~n~~b~Localizacao: ~w~%s~n~~b~Gasolina: %d",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth,LPosZ,LuxZone,Gas[vehicle]);
TextDrawSetString(LFunc[i], lstring);
format(lstr,sizeof(lstr),"%sMPH: ~w~%d %sKM/H: ~w~%d",MPH_KPH_Color,LMPH,MPH_KPH_Color,LKPH);
TextDrawSetString(Lmph[i], lstr);
if(L_VehHealth <= 500){
format(lstring,sizeof(lstring),"%sVeiculo: ~w~%s~n~%sLataria: ~w~~r~%.2f~n~%sAltitude: ~w~%.1f~n~%sLocalizacao: ~w~%s~n~%sGasolina: %d",CategoriesColor,vehName[GetVehicleModel(GetPlayerVehicleID(i))-400],CategoriesColor,L_VehHealth,CategoriesColor,LPosZ,CategoriesColor,LuxZone,CategoriesColor,Gas[vehicle]);
TextDrawSetString(LFunc[i], lstring);
}
}
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]);
TextDrawShowForPlayer(i, rodape[i]);
TextDrawHideForPlayer(i, url[i]);
LuX_SpeedoMeter[i] = 0;
}
}
return 1;
}