Textdraw Timer
#1

Hi, i need help with my textdraw ^^,

How to add a timer, if a player is age 16 he can't drive a car, i have this, but he exit the vehicle, and he see always that text :/
how to delete that in 10sec, i know timer, but if i add it give much errors :/

pawn Код:
new Text:SixteenyearTextdraw;
pawn Код:
SixteenyearTextdraw = TextDrawCreate(XXX.XXXXXX, XXX.XXXXXX, "text here ^^");
TextDrawAlignment(SixteenyearTextdraw, XXXXX);
TextDrawBackgroundColor(SixteenyearTextdraw, XXXXXXXXXXXX);
TextDrawFont(SixteenyearTextdraw, X);
TextDrawLetterSize(SixteenyearTextdraw, XXXXXXXXXXXXXXX);
TextDrawColor(SixteenyearTextdraw, XXXXXXXX);
TextDrawSetOutline(SixteenyearTextdraw, XXXXX);
TextDrawSetProportional(SixteenyearTextdraw, XXXXX);
TextDrawSetShadow(SixteenyearTextdraw, X);
pawn Код:
TextDrawShowForPlayer(playerid, SixteenyearTextdraw);
thanks
Reply
#2

If this is for RP then what will they drive? Faggio,BMX?

I think this is not cool ag should be 15, in Californian law, 16 year olds can drive if they pass the high school driving school they get a permit, then they could go to DMV and apply for a appointment to get a license
Reply
#3

Quote:
Originally Posted by Steven82
If this is for RP then what will they drive? Faggio,BMX?

I think this is not cool ag should be 15, in Californian law, 16 year olds can drive if they pass the high school driving school they get a permit, then they could go to DMV and apply for a appointment to get a license
so? its my server, this is much RP, and maybe i change it to 15, i want this, but i need someone that can make a timer on it

What do i mean:

you can see the first post, can someone make a timer on it, if a player enter a car and he is 16 years old, then remove the server the player, but then see he the text everytime? maybe someone can make a timer, that he see that text 10sec?
Reply
#4

mmm? does nobody know how to make timer? or don't want to help?
Reply
#5

>>> SetTimerEx <<<

pawn Код:
//OnPlayerExitVehicle
SetTimerEx("HideTextDraw", 10000, 0, "i", playerid);

//Somewhere in the script
forward HideTextDraw(playerid);
public HideTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid, SixteenyearTextdraw);
}
Reply
#6

Quote:
Originally Posted by Mастерминд
>>> SetTimerEx <<<

pawn Код:
//OnPlayerExitVehicle
SetTimerEx("HideTextDraw", 10000, 0, "i", playerid);

//Somewhere in the script
forward HideTextDraw(playerid);
public HideTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid, SixteenyearTextdraw);
}
thx, i don't like timers ^^
Reply
#7

Quote:
Originally Posted by Silox
Quote:
Originally Posted by Mастерминд
>>> SetTimerEx <<<

pawn Код:
//OnPlayerExitVehicle
SetTimerEx("HideTextDraw", 10000, 0, "i", playerid);

//Somewhere in the script
forward HideTextDraw(playerid);
public HideTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid, SixteenyearTextdraw);
}
thx, i don't like timers ^^
you can do it with just settimer, saves some size in your file (only a couple of bytes but it all helps)

SetTimer("HideTextDraw", 10000, 0);

Explanation

SetTimer(1, 2, 3);

1: Function to call
2: Time in ms 1000 = 1 second
3: Repeat or not 1=yes 0=no
Reply
#8

Quote:
Originally Posted by adsy
Quote:
Originally Posted by Silox
Quote:
Originally Posted by Mастерминд
>>> SetTimerEx <<<

pawn Код:
//OnPlayerExitVehicle
SetTimerEx("HideTextDraw", 10000, 0, "i", playerid);

//Somewhere in the script
forward HideTextDraw(playerid);
public HideTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid, SixteenyearTextdraw);
}
thx, i don't like timers ^^
you can do it with just settimer, saves some size in your file (only a couple of bytes but it all helps)

SetTimer("HideTextDraw", 10000, 0);

Explanation

SetTimer(1, 2, 3);

1: Function to call
2: Time in ms 1000 = 1 second
3: Repeat or not 1=yes 0=no
Eh no you cant,
SetTimer is for everybody,
So it would do that to everybody,

So you would use SetTimerEx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)