SA-MP Forums Archive
FUEL System help ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: FUEL System help ! (/showthread.php?tid=353966)



FUEL System help ! - PaulDinam - 25.06.2012

I added this fuel system:
https://sampforum.blast.hk/showthread.php?tid=169284

but it have a bug




it shows me the text draw 2 times you can see it up to the hp bar.. it's like dissapearing and then appears again.


Re: FUEL System help ! - Lorenc_ - 25.06.2012

pawn Код:
new Text:td_fuel[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW,...}; // Add the little extension!

public OnPlayerSpawn(playerid)
{
    TextDrawDestroy(td_fuel[playerid]);
    td_fuel[playerid] = TextDrawCreate(45,324,"Fuel: 100"); //create the textdraw at position
    TextDrawBackgroundColor(td_fuel[playerid],0x00000033); //setting an nice backgroundcolor
    TextDrawFont(td_fuel[playerid],3); //font type of textdraw
    TextDrawLetterSize(td_fuel[playerid],0.699999,1.700000); //size...
    TextDrawColor(td_fuel[playerid],0x000000ff); //color
    TextDrawSetShadow(td_fuel[playerid],3); //dropping the shadow
    return 1;
}