forward NoExplode(playerid); public NoExplode(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); SetTimer("Finshed",6000,false); if(gTeam[i] == TEAM_ATTACKERS) { GameTextForPlayer(i, "~g~ ~n~Mission Passed", 6000, 4); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); GivePlayerMoney(i, 10000); SetPlayerScore(i,GetPlayerScore(i)+5); SendClientMessage(playerid,yellow,"{7C7C7C}» You've Recieved 5 Points and $10,000 for Completing the mission Objective."); SetPlayerCameraPos(i, 1930.1677,-571.0945,23.8120); SetPlayerCameraLookAt(i, 1911.5667,-563.5245,25.0610); } else if(gTeam[i] == TEAM_DEFENDERS) { GameTextForPlayer(i, "~r~ ~n~Mission Failed", 6000, 4); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); SendClientMessage(playerid,yellow,"{FF0000}» You've Lost -$2000 Money for Not completing the Mission Objective."); SetPlayerCameraPos(i, 1930.1677,-571.0945,23.8120); GivePlayerMoney(i,-2000); SetPlayerCameraLookAt(i, 1911.5667,-563.5245,25.0610); } SetTimer("Finshed",2000,false); } } return 1; } forward NoExplode2(playerid); public NoExplode2(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); if(gTeam[i] == TEAM_DEFENDERS) { GameTextForPlayer(i, "~g~ ~n~Mission Passed", 6000, 4); SendClientMessage(playerid,yellow,"{7C7C7C}» You've Recieved 5 Points and $10,000 for Completing the mission Objective."); GivePlayerMoney(i, 10000); SetPlayerScore(i,GetPlayerScore(i)+5); SetTimer("Finshed", 6000, 0); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); SetPlayerCameraPos(i, 1276.0552,-788.1879,96.9662); SetPlayerCameraLookAt(i, 1288.8605,-788.3223,96.4609); } else if(gTeam[i] == TEAM_ATTACKERS) { GameTextForPlayer(i, "~r~ ~n~Mission Failed", 6000, 4); SendClientMessage(playerid,yellow,"{FF0000}» You've Lost -$2000 Money for Not completing the Mission Objective."); SetPlayerCameraPos(i, 1276.0552,-788.1879,96.9662); SetPlayerCameraLookAt(i, 1288.8605,-788.3223,96.4609); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); GivePlayerMoney(i, -2000); SetTimer("Finshed",6000,false); } PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFF00FFFFF,"{55FF00}» Success : {FFFFFF}Your Stats have been Successfully Saved."); SetTimer("Finshed",2000,false); } } return 1; } public Finshed(playerid) { SendRconCommand("changemode next-mission-name-here"); return 1; } public Finshed2(playerid) { for(new i = 0; playerid < MAX_PLAYERS; playerid++) { if(IsPlayerConnected(i)) { if(gTeam[i] == TEAM_DEFENDERS) { GameTextForPlayer(i, "~r~ Mission Failed", 6000, 4); SendClientMessageToAll(COLOR_RED, "{E4E05D}» The Security Guards have Successfully defend the Helicopter from the Thieves."); SetTimer("Finshed", 2000, 0); } else if(gTeam[i] == TEAM_ATTACKERS) { GameTextForPlayer(i, "~g~ Mission Passed", 6000, 4); GivePlayerMoney(i, 10000); SetPlayerScore(playerid,GetPlayerScore(playerid)+5); } } } SetTimer("Finshed", 2000, 0); return 1; } forward Load(playerid); public Load(playerid) { SetTimerEx("NoExplode2",290000,false,"i", playerid); }
if(gTeam[i] == TEAM_DEFENDERS && fTeam[i] == TEAM_ATTACKERS)
{
//print the win message for defenders and fail message for attackers.
}
if(gTeam[i] == TEAM_DEFENDERS && fTeam[i] == TEAM_ATTACKERS) { //print the win message for defenders and fail message for attackers. }
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); if(gTeam[i] == TEAM_DEFENDERS) { GameTextForPlayer(i, "~g~ ~n~Mission Passed", 6000, 4); SendClientMessage(playerid,yellow,"{7C7C7C}» You've Recieved 5 Points and $10,000 for Completing the mission Objective."); GivePlayerMoney(i, 10000); SetPlayerScore(i,GetPlayerScore(i)+5); SetTimer("Finshed", 6000, 0); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); SetPlayerCameraPos(i, 1276.0552,-788.1879,96.9662); SetPlayerCameraLookAt(i, 1288.8605,-788.3223,96.4609); } else if(gTeam[i] == TEAM_ATTACKERS) { GameTextForPlayer(i, "~r~ ~n~Mission Failed", 6000, 4); SendClientMessage(playerid,yellow,"{FF0000}» You've Lost -$2000 Money for Not completing the Mission Objective."); SetPlayerCameraPos(i, 1276.0552,-788.1879,96.9662); SetPlayerCameraLookAt(i, 1288.8605,-788.3223,96.4609); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); GivePlayerMoney(i, -2000); SetTimer("Finshed",6000,false); } PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFF00FFFFF,"{55FF00}» Success : {FFFFFF}Your Stats have been Successfully Saved."); SetTimer("Finshed",2000,false);
forward NoExplode2(playerid); public NoExplode2(playerid) {
you mean i need to add
Код:
if(gTeam[i] == TEAM_DEFENDERS && fTeam[i] == TEAM_ATTACKERS) { //print the win message for defenders and fail message for attackers. } Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); if(gTeam[i] == TEAM_DEFENDERS) { GameTextForPlayer(i, "~g~ ~n~Mission Passed", 6000, 4); SendClientMessage(playerid,yellow,"{7C7C7C}» You've Recieved 5 Points and $10,000 for Completing the mission Objective."); GivePlayerMoney(i, 10000); SetPlayerScore(i,GetPlayerScore(i)+5); SetTimer("Finshed", 6000, 0); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); SetPlayerCameraPos(i, 1276.0552,-788.1879,96.9662); SetPlayerCameraLookAt(i, 1288.8605,-788.3223,96.4609); } else if(gTeam[i] == TEAM_ATTACKERS) { GameTextForPlayer(i, "~r~ ~n~Mission Failed", 6000, 4); SendClientMessage(playerid,yellow,"{FF0000}» You've Lost -$2000 Money for Not completing the Mission Objective."); SetPlayerCameraPos(i, 1276.0552,-788.1879,96.9662); SetPlayerCameraLookAt(i, 1288.8605,-788.3223,96.4609); PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0); GivePlayerMoney(i, -2000); SetTimer("Finshed",6000,false); } PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFF00FFFFF,"{55FF00}» Success : {FFFFFF}Your Stats have been Successfully Saved."); SetTimer("Finshed",2000,false); Код:
forward NoExplode2(playerid); public NoExplode2(playerid) { |
1. if(gTeam[i] == TEAM_DEFENDERS && fTeam[i] == TEAM_ATTACKERS)
{
//body
}
2. else if(gTeam[i] == TEAM_ATTACKERS && fTeam[i] == TEAM_DEFENDERS)
{
//body
}
3. else
{
//body when no one wins (timer runs out)
}
1. if(gTeam[i] == TEAM_DEFENDERS && fTeam[i] == TEAM_ATTACKERS) { //body } 2. else if(gTeam[i] == TEAM_ATTACKERS && fTeam[i] == TEAM_DEFENDERS) { //body } 3. else { //body when no one wins (timer runs out) }
1. if(gTeam[i] == TEAM_DEFENDERS && fTeam[i] == TEAM_ATTACKERS)
{
//body
}
2. else if(gTeam[i] == TEAM_ATTACKERS && fTeam[i] == TEAM_DEFENDERS)
{
//body
}
3. else
{
//body when no one wins (timer runs out)
}