SA-MP Forums Archive
Passing "Text:" type on timer - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Passing "Text:" type on timer (/showthread.php?tid=228990)



Passing "Text:" type on timer - SimonItaly - 20.02.2011

Hi everyone.
So, this is my function

Код:
public Hide_TD(playerid, Text:TD_ID)
{
    TextDrawHideForPlayer(playerid, TD_ID);
}
and my code

Код:
TextDrawShowForPlayer(playerid, TD);
SetTimerEx("Hide_TD", 4000, 0, "dd", playerid, TD);
Obivously I get a "tag mismatch" warning, cause I'm trying to pass text as integer.
How can I pass "Text:" variables in timers?


Re: Passing "Text:" type on timer - Ash. - 20.02.2011

It should work, it should pass its ID as you would expect...
I run things like the above and it works perfectly.


Re: Passing "Text:" type on timer - MadeMan - 20.02.2011

This code should work.

But to remove the warning you can try this

pawn Код:
SetTimerEx("Hide_TD", 4000, 0, "dd", playerid, _:TD);



Re: Passing "Text:" type on timer - SimonItaly - 20.02.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
This code should work.

But to remove the warning you can try this

pawn Код:
SetTimerEx("Hide_TD", 4000, 0, "dd", playerid, _:TD);
Exactly what I was seeking for, thanks!