SetTimerEx string
#1

SetTimerEx can't pass strings. I know that. Is there a way to do it?
Reply
#2

I believe y_timers has such implementation, I wouldn't quote me on that though, as I haven't actually looked into it.
Reply
#3

By creating a global variable and store the string there.
Reply
#4

Quote:
Originally Posted by =WoR=Varth
Посмотреть сообщение
By creating a global variable and store the string there.
Could you elaborate?
Reply
#5

pawn Код:
#define MAX_TIMERS  512

new String[MAX_TIMERS][128];//Global
    timerid;

//Somewhere
SetTimerEx("blahblahblah",1000,1,"dd",playerid,timerid);
format(String[timerid],sizeof(String),"%s","Your string here");
timerid++;


public blahblahblah(playerid,id)
{
    SendClientMessage(playerid,-1,String[id]);
Reply
#6

Timer IDs go up way past 512 AFAIK they don't 'replace' finished timers. I have hundreds of timers in my gamemode. I'm not going to create a 290865209465436 cell array with 128 cells per timer ID to store strings in..
Reply
#7

I knew that already. I'm just giving an example.
Another method can be done with GVar (Search this include in include section).
There's many method you can try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)