One question
#1

Hello, I have a question. Is SetTimer and SetTimerEx is the same?
Reply
#2

SetTimer
SetTimerEx

Read them.
Reply
#3

NO, SetTimer is for All
But SetTimerEx is only for a individual player
Reply
#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
#5

Well, I never checked the samp wiki becuase i never got any problem with timer!
So i told him wht i think
Reply
#6

BIG Thanks to all
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)