09.01.2016, 07:34
Hi, I have a Problem with SetTimer.
This Timer is of 5 minute, When this timer gets over. a New Timer gets set "NexMode" which is set to 14 seconds. but its getting load before 14 seconds.
its like when 5 minutes passed, The Nexmode loads suddenly instead of waiting 14 seconds.
This Timer is of 5 minute, When this timer gets over. a New Timer gets set "NexMode" which is set to 14 seconds. but its getting load before 14 seconds.
Код:
public OnGameModeInit() { Timer2 = SetTimer("NoExplode",300000,false); return 1; }
Код:
forward NoExplode(playerid); public NoExplode(playerid) { SetTimer("NexMode", 14000, false); SendClientMessageToAll(-1, "{E1CC2B}» Employers have successfully defended their Ship from being attacked by terrorist."); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(gTeam[i] == TEAM_ARMY) { MissionPassed(i); GivePlayerMoney(i, 4000); SetPlayerScore(i,GetPlayerScore(i)+3); SendClientMessage(i,-1,"{7C7C7C}» You've Recieved 3 Points and $4,000 for Completing the mission Objective."); PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); } else if(gTeam[i] == TEAM_TERRIOST) { MissionFailed(i); PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); GivePlayerMoney(i, -2000); SendClientMessage(i,-1,"{FF0000}» You've Lost -$2000 Money for not completing the Mission Objective."); } } } return 1; }