Text draw only for some seconds
#1

Hi all guys i have text draw on my server but text draw is destroyed when i spawn the player i want when i connect to i see text draw only for 5 seconds and then destroy.May be i must use a timers and other things
Help me guys

Reply
#2

If you want to use the texdraw only for 5 second, why not to use GameTextForPlayer ?
Reply
#3

Yeah but i want to know how to make it for 5 seconds
Reply
#4

On OnPlayerConnect you enable the Textdraw, and set a timer for the player (SetTimerEx). In the public you hide the textdraw again. Thats basicly everything you should do.

Note: Textdraw has a small bug in it sometimes, read this for more information.
Reply
#5

Can you give me the code for some text draw for example please ?
Reply
#6

pawn Код:
// Defines
new Text:Textdraw;

// OnGameModeInit
// Add the textdraw create shizzle here

// Somewhere where you want your textdraw to be shown
TextDrawShowForPlayer(playerid, Textdraw);
SetTimerEx("TextdrawHide", 5000, 0, "i", playerid);

// On the end of your script
forward TextdrawHide(playerid);
public TextdrawHide(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw);
}
Just an example.
Reply
#7

Ok man thank you but i do all and the text dont destroy sorry i m noob scripter but i want some example for the timer please make the timer to show the text only for 3/4 seconds ALREADY THANKS
Reply
#8

?
Reply
#9

SetTimerEx("TextdrawHide", 5000, 0, "i", playerid);
Change the milliseconds number ^^.
Reply
#10

Thank you friend finally it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)