06.11.2011, 09:03
The problem i got is these timer work when im testing the on my own find but soon as i load them into my Server they dont work any ideas why? I think they are only working for one person at atime is there away for me to change this?
Many thanks
Код:
forward Sfraceclock(playerid);
public Sfraceclock(playerid) {
if(iSfraceclock == -1) {
iSfraceclock = 81;
}
new
szMessage[10];
iSfraceclock--;
format(szMessage, sizeof(szMessage), "~r~%d",iSfraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iSfraceclock == 0) {
KillTimer(Sfracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Eastraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Eastraceclock(playerid) {
if(iEastraceclock == -1) {
iEastraceclock = 71;
}
new
szMessage[10];
iEastraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iEastraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iEastraceclock == 0) {
KillTimer(Eastracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Hillraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Hillraceclock(playerid) {
if(iHillraceclock == -1) {
iHillraceclock = 71;
}
new
szMessage[10];
iHillraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iHillraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iHillraceclock == 0) {
KillTimer(Hillracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Downraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Downraceclock(playerid) {
if(iDownraceclock == -1) {
iDownraceclock = 56;
}
new
szMessage[10];
iDownraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iDownraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iDownraceclock == 0) {
KillTimer(Downracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Westraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Westraceclock(playerid) {
if(iWestraceclock == -1) {
iWestraceclock = 61;
}
new
szMessage[10];
iWestraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iWestraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iWestraceclock == 0) {
KillTimer(Westracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Chinaraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Chinaraceclock(playerid) {
if(iChinaraceclock == -1) {
iChinaraceclock = 75;
}
new
szMessage[10];
iChinaraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iChinaraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iChinaraceclock == 0) {
KillTimer(Chinaracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Dockraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Dockraceclock(playerid) {
if(iDockraceclock == -1) {
iDockraceclock = 91;
}
new
szMessage[10];
iDockraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iDockraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iDockraceclock == 0) {
KillTimer(Dockracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Waterraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Waterraceclock(playerid) {
if(iWaterraceclock == -1) {
iWaterraceclock = 61;
}
new
szMessage[10];
iWaterraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iWaterraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iWaterraceclock == 0) {
KillTimer(Waterracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}
forward Offroadraceclock(playerid); // Also make a new SetTimerEx function in which you just add the number 1 in the funciton name.
public Offroadraceclock(playerid) {
if(iOffroadraceclock == -1) {
iOffroadraceclock = 200;
}
new
szMessage[10];
iOffroadraceclock--; // v down there, I have put ~n~ because that makes a new row, you don't want the timers to be in the same row and get one over an other.
format(szMessage, sizeof(szMessage), "~r~%d",iOffroadraceclock); // Add more in if you wish.
GameTextForPlayer(playerid, szMessage, 950, 6);
if(iOffroadraceclock == 0) {
KillTimer(Offroadracetimer);
DisablePlayerRaceCheckpoint(playerid);
P_DATA[ playerid ][ P_OnStyle ] = false;
}
return 1;
}


