Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward Race::StartRace();
- public Race::StartRace()
- {
- foreach(Player, i)
- {
- if(Race::IsPlayerInRace(i))
- {
- new tString[128];
- format(tString, sizeof(tString), "~r~RACE (%s): %s is starting,~n~~w~ good luck and have fun!", Race::GetRaceTypeName(), RaceData[RaceName]);
- TextDraw::ShowSubtitle(i, tString, 3000, true);
- TogglePlayerControllable(i, 0);
- SetCameraBehindPlayer(i);
- }
- }
- RaceTimer = SetTimer("c26CountdownRace", 1000, 1);
- return 1;
- }
- forward Race::CountdownRace();
- public Race::CountdownRace()
- {
- foreach(Player, i)
- {
- if(Race::IsPlayerInRace(i))
- {
- if(CountDown == 11)
- {
- DisablePlayerRaceCheckpoint(i);
- GameTextForPlayer(i, "~w~10", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 10)
- {
- GameTextForPlayer(i, "~w~9", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 9)
- {
- GameTextForPlayer(i, "~w~8", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 8)
- {
- GameTextForPlayer(i, "~w~7", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 7)
- {
- GameTextForPlayer(i, "~w~6", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 6)
- {
- GameTextForPlayer(i, "~w~5", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 5)
- {
- GameTextForPlayer(i, "~w~4", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 4)
- {
- GameTextForPlayer(i, "~r~3", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 3)
- {
- GameTextForPlayer(i, "~y~2", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 2)
- {
- GameTextForPlayer(i, "~y~1", 600, 4);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- else if(CountDown == 1)
- {
- GameTextForPlayer(i, "~g~~h~GO! GO! GO!", 1200, 4);
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(i, 0, RaceData[RACE_X][1], RaceData[RACE_Y][1], RaceData[RACE_Z][1], RaceData[RACE_X][2], RaceData[RACE_Y][2], RaceData[RACE_Z][2], RACE_CHECKPOINT_SIZE);
- TogglePlayerControllable(i, 1);
- Race::SetRacePosition(i, 1);
- Race::SetRaceProgression(i, 2);
- KillTimer(RaceTimer);
- CountDown = 11;
- RaceStarted = 1;
- }
- }
- }
- CountDown --;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement