06.09.2009, 17:03
Hey there,
I found this in some script and I want to change it so like when someone enters the checkpoint it says ''You have placed the explosive!'' and for TEAM_TRIAD it says ''Mafia has placed the explosive, run away!'' and so the timer runs for 20 seconds, and after 20 seconds the ship explodes.
Here is the code I have:
thanks and regards
Puzi
I found this in some script and I want to change it so like when someone enters the checkpoint it says ''You have placed the explosive!'' and for TEAM_TRIAD it says ''Mafia has placed the explosive, run away!'' and so the timer runs for 20 seconds, and after 20 seconds the ship explodes.
Here is the code I have:
Код:
public OnPlayerEnterCheckpoint(playerid) { if(gObjectiveReached) return; if(gTeam[playerid] == TEAM_MAFIA) { gMafiaWin++; SetPlayerScore(playerid,GetPlayerScore(playerid)+5); if(gMafiaWin==CAPS_TO_WIN) { GameTextForAll("The ~r~Mafia ~w~has broken in sucessfully!",3000,5); gObjectiveReached = 1; PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); SetTimer("GameModeExitFunc", gRoundTime, 0); // Set up a timer to exit this mode. EndTheRound(ATTACK_WIN); } else { GameTextForAll("A ~r~Mafia ~w~ broke in!",3000,5); DisablePlayerCheckpoint(playerid); } return; } else if(gTeam[playerid] == TEAM_TRIAD) { GameTextForAll("You failed to defend the ship!",3000,5); gObjectiveReached = 1; PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); SetTimer("GameModeExitFunc", gRoundTime, 0); // Set up a timer to exit this mode. } else { GameTextForAll("A~r~ Mafia~w~ broke in! kill him!",3000,5); } return; }
Puzi