How to restart a Textdraw?
#1

Hi so I'm using a little different version of ipleomax's speedometer. https://sampforum.blast.hk/showthread.php?tid=266455
My problem sometimes is that the velocity textdraw (the one that indicates with numbers) freezes at '000' and doesn't update with TextDrawUpdate(playerid) or SpeedUpdate(playerid)..

So my question is, how can I restart a textdraw efficiently with bugging even more?

I'm using this:
pawn Код:
public StartSpeedo(){
    foreach(Player, i) {
    RemovePlayerFromVehicle(i);
    Speed[i] = TextDrawCreate(441.000000, 362.000000, "000");
    TextDrawAlignment(Speed[i], 3);
    TextDrawBackgroundColor(Speed[i], 0x099FF66FF); //-16776961
    TextDrawFont(Speed[i], 3);
    TextDrawLetterSize(Speed[i], 0.740000, 4.299999);
    TextDrawColor(Speed[i], 255);
    TextDrawSetOutline(Speed[i], 1);
    TextDrawSetProportional(Speed[i], 1);
    }
    return true;
}
public StopSpeedo(){
    foreach(Player, i)  {
    RemovePlayerFromVehicle(i);
    TextDrawDestroy(Speed[i]);
    }
    return true;
}
To see if I can restart the textdraw, still didn't test it.

EDIT: Ok, that didn't work, now Im trying to reset the timers insted of creating and destroying the textdraw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)