SHARE
TWEET

Events

-Muver- Apr 21st, 2019 152 in 336 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function SetEvents(events)
  2.     if Session:IsHost() then
  3.         Session:ClearAllRaces()
  4.     end
  5.     local info = Session:GetInfo()
  6.  
  7.     for i = 1, table.getn(events) do
  8.         if Session:IsHost() then
  9.             Session:AddRace()
  10.         end
  11.         info.Races[i].StageNr = events[i].trackid
  12.         info.Races[i].TrackType = events[i].rules
  13.         info.Races[i].EventType = events[i].rules
  14.         info.Races[i].LapsOrTimeLimit = events[i].lapsOrTimeLimit
  15.         if info.Races[i].EventType == ReplicatedSession.GAMETYPE_HUNTER_PREY then
  16.             info.Races[i].NumHunters = events[i].numhunters
  17.         end
  18.         info.Races[i].Raced = false
  19.     end
  20.  
  21.     info.NextRace = 1
  22.    
  23.     if info.Races[1].EventType == ReplicatedSession.GAMETYPE_STUNT and info.CarClass >= 5 and not IsStuntCar(info.CarClass - 5) then
  24.         ChangeCar()
  25.         return
  26.     elseif info.Races[1].EventType ~= ReplicatedSession.GAMETYPE_STUNT and info.CarClass >= 5 and IsStuntCar(info.CarClass - 5) then
  27.         ChangeCar()
  28.         return
  29.     end
  30.    
  31.     EnterMenu("menu_multiplayer_lobby")
  32. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top