20.01.2011, 22:10
Hello , i'd like to know how i can make a textdraw disappear after 10 seconds.I know , i have to use a timer but i don't know how to make the textdraw disspear .
#include <a_samp> new Text:Textdraw0; public OnFilterScriptInit() { print("Textdraw file generated by"); print(" Zamaroht's textdraw editor was loaded."); SetTimer("InCar",10000,1); Textdraw0 = TextDrawCreate(288.000000, 430.000000, "Apasa 2 pentru a repara masina si apasa CLICK pentru a adauga nitro!"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdraw0, 0.280000, 1.000000); TextDrawColor(Textdraw0, 1502239743); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); return 1; } public OnFilterScriptExit() { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { TextDrawShowForPlayer(playerid, Textdraw0); } else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) { TextDrawHideForPlayer(playerid, Textdraw0); } return 1; } forward InCar(); public InCar() { TextDrawDestroy(Text:Textdraw0); return 1; }
SetTimer("InCar",10000,1);
SetTimerEx("InCar",10000,0,"i",playerid);
TextDrawShowForPlayer(playerid, Textdraw0);
forward InCar();
public InCar()
{
TextDrawDestroy(Text:Textdraw0);
return 1;
}
forward InCar(playerid);
public InCar(playerid) TextDrawHideForPlayer(playerid, Textdraw0);