14.08.2012, 04:19
You're using SetTimer, and not SetTimeEx.
With SetTimer, you can't pass extra parameters, watch this code:
StartEngine has 1 parameter which is "playerid" but can't be passed because you're using SetTimer, however, if you did this:
First you put the specifiers to know how many parameters you want to pass, and their type, then list them.
You could even do this:
This is how you do it with multiple parameters.
For future reference, you don't have to use the 'const' keyword in this situation, as it becomes a read-only variable that can't be altered by the program after initialised, at least in C / C++.
pawn Код:
SetTimer("StartEngine", 2000, false);
pawn Код:
public StartEngine(const playerid)
pawn Код:
SetTimerEx("StartingEngine", 2000, false, "d", playerid);
You could even do this:
pawn Код:
SetTimerEx("StartEngine", 2000, false, "dd", playerid, vehicleid);
For future reference, you don't have to use the 'const' keyword in this situation, as it becomes a read-only variable that can't be altered by the program after initialised, at least in C / C++.

