SetTimer("SpeedTimer", 80, true); // Speed TextDraw
SetTimer("HealthTima", 80, true); // Health TextDraw
SetTimer("FuelTima", 80, true); // Fuel TextDraw
SetTimer("VehicleTima", 80, true);
SetTimerEx("SpeedTimer", 80, true,"i",playerid); // Speed TextDraw
SetTimer("HealthTima", 80, true,"i",playerid); // Health TextDraw
SetTimer("FuelTima", 80, true,"i",playerid); // Fuel TextDraw
SetTimer("VehicleTima", 80, true,"i",playerid);
Try using original callback instead of timers, all this function can be done with 1 timer!
|
While I do support the writing of tutorials, there are some huge issues that need to be addressed here.
1. Combining all timers into one or having less timers with more code is actually probably more problematic than having more times with less code. The statement I just made is valid in most cases, and the more code and the more timers combined into one there are, the more valid it becomes. Why? Due to the way SA-MP synchronization works. And if you think about it, it'll make sense. Reading on the subject (more specifically, "Timers are efficient" paragraph) This is the best topic I can find for this purpose right now. |
SetTimer("Clock", 1000, true);
SetTimer("ADTimer", 1300, true);
SetTimer("NOPSetPlayerPos", 1600, true);
SetTimer("SaveServer", 150000, true);
SetTimer("AltTabTimer", 1900, true);
SetTimer("WeaponCheat", 2200, true);
SetTimer("FuelTimer", 2500, true);
SetTimer("PrisonTimer", 2800, true);
SetTimer("LoyalFeatures", 60000, true);
SetTimer("SpeedTimer", 3100, true); // Speed TextDraw
SetTimer("HealthTima", 3500, true); // Health TextDraw
SetTimer("FuelTima", 3900, true); // Fuel TextDraw
SetTimer("VehicleTima", 4200, true);
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod.pwn(196) : warning 202: number of arguments does not match definition C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod.pwn(196) : error 017: undefined symbol "playerid"
SetTimer("Speedometer", 100, true, "i", playerid);
i have same problem with this erros:
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod.pwn(196) : warning 202: number of arguments does not match definition C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod.pwn(196) : error 017: undefined symbol "playerid" Код:
SetTimer("Speedometer", 100, true, "i", playerid); |
for(new playerid=0; playerid <MAX_PLAYERS; playerid++)
{ //Might Fix your problem
Um Playerid Aint called ongamemodeinit Do this
pawn Код:
|