One question
#4

Quote:
Originally Posted by Hanuman
Посмотреть сообщение
NO, SetTimer is for All
But SetTimerEx is only for a individual player
Wrong!

--------------------------------------------------

Nope, if they were the same, why would they exist as two different natives?

SetTimer - you can execute a function with NO arguments with this.
SetTimerEx - you can execute a function with arguments you HAVE passed.

Example -
pawn Код:
noArgs()
{
    printf("No arguments.");
}

oneArg( number )
{
   printf(" Number: %d", number);
}

public OnGameModeInit()
{
     SetTimer("noArgs", 1000, false);
     SetTimerEx("oneArg", 1000, false, "i", 5);
     // i specifier tells that we are passing an integer.
     return 1;
}
Output -
pawn Код:
No arguments.
Number: 5
Read about specifiers here.
Reply


Messages In This Thread
One question - by Tadas - 21.03.2014, 08:01
Re: One question - by BizzyD - 21.03.2014, 08:07
Re: One question - by Hanuman - 21.03.2014, 08:08
Re: One question - by RajatPawar - 21.03.2014, 08:10
Re: One question - by Hanuman - 21.03.2014, 08:28
Re: One question - by Tadas - 21.03.2014, 09:07

Forum Jump:


Users browsing this thread: 3 Guest(s)