PDA

View Full Version : Texdraw not move (+rep)


ScripteRMKD
02/03/2014, 12:19 AM
Hi Scripterzzz.I have problem with my Speedometer ... i maked it t.e edit from LuX and yesterday it working but now not working :(

format(lstr,sizeof(lstr)," ~w~%d",GetPlayerSpeed(i));
TextDrawSetString(Lmph[i], lstr); why ??

stock GetPlayerSpeed(playerid)
{
if(playerid != INVALID_PLAYER_ID)
{
new Float:Pos[3],Float:PS;
GetPlayerVelocity(playerid, Pos[0], Pos[1], Pos[2]);
PS = floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
return floatround(PS,floatround_round);
}
return INVALID_PLAYER_ID;
}


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<MAX_PLAYERS; i++)
{
if(VehicleStatus[GetPlayerVehicleID(i)] == 1)
{
LVehicleStatus = "~r~Zakluceno";
}
else
{
LVehicleStatus = "~g~Otkluceno";
}
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_ReadP layerPosition[i][ReadY])),2)+floatpower(floatabs(floatsub(LPosZ,LuX_ReadP layerPosition[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]);
Gas[GetPlayerVehicleID(i)] = 100;
LuX_SpeedoMeter[i] = 1; }
//------------------------------------------------------------------------------
format(lstring,sizeof(lstring),"~b~Vozilo: ~w~%s~n~~b~Jacina: ~w~%.2f~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);
//------------------------------------------------------------------------------
format(lstr,sizeof(lstr)," ~w~%d",GetPlayerSpeed(i));
TextDrawSetString(Lmph[i], lstr);
//------------------------------------------------------------------------------
}
//------------------------------------------------------------------------------
LuX_ReadPlayerPosition[i][ReadX] = LPosX, LuX_ReadPlayerPosition[i][ReadY] = LPosY, LuX_ReadPlayerPosition[i][ReadZ] = LPosZ;}
for(new i=0; i<MAX_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;
} repping please

ScripteRMKD
02/03/2014, 10:02 PM
helppp

ScripteRMKD
03/03/2014, 01:06 PM
>???

mahardika
03/03/2014, 01:11 PM
whats the problem? tell me

ScripteRMKD
03/03/2014, 03:31 PM
that is speedometer and speed not working t.e textdraw not going up 1 50 100 200 why ?

ScripteRMKD
03/03/2014, 08:56 PM
help please !!

mahardika
05/03/2014, 08:51 AM
place
SetTimer("LuX_SpeedoMeterUp", 1000, true);
under Ongamemodeinit

Make Sure you Forward it First

ScripteRMKD
05/03/2014, 09:19 PM
not working :(

ScripteRMKD
09/03/2014, 12:25 AM
anyone can help me please ??

ScripteRMKD
09/03/2014, 12:39 AM
fixed i changed the stock