Alternative implementation of "wait".
#7

Quote:
Originally Posted by Emmet_
View Post
Nice, but what if Wait is inside a loop, a return, or perhaps like this:

pawn Code:
if (Wait(1000)<a>)
Or perhaps this:

pawn Code:
public OnPlayerConnect(playerid)
{
    Wait(1000)<a>;
    SendClientMessage(playerid, -1, "Welcome."); // No Undefined symbol "playerid" :D
}
with the secound method you can do something like that

Code:
#define Wait(%0)<%1,%2,%3> return SetTimerEx("@wait_"#%1,%0,false,%2,%3); } \
					forward @wait_%1(%3); @wait_%1(%3) {
Code:
public OnPlayerConnect(playerid)
{
    Wait(1000)<a,"i",playerid>;
    SendClientMessage(playerid, -1, "Welcome."); // No Undefined symbol "playerid" :D
}
Reply


Messages In This Thread
Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 11:59
Re: Alternative implementation of "wait". - by Patrick - 02.01.2014, 12:07
Re: Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 17:18
Re: Alternative implementation of "wait". - by IPrototypeI - 02.01.2014, 18:08
Re: Alternative implementation of "wait". - by IPrototypeI - 02.01.2014, 19:03
Re: Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 19:11
Re: Alternative implementation of "wait". - by IPrototypeI - 02.01.2014, 19:22
Re: Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)