Added Effects:
new file: Peds/PedsSetEveryoneIntoRandomVehicle.lua new file: Player/PlayerBankHeist.lua new file: Player/PlayerTPToLastVehicle.lua Modified: Weather/WeatherCanadian.lua - reversed a True/False Statement to potentially fix a bug that throws around vehicles when the ped gets a snowman spawned on them.
This commit is contained in:
31
Peds/PedsSetEveryoneIntoRandomVehicle.lua
Normal file
31
Peds/PedsSetEveryoneIntoRandomVehicle.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
EffectInfo = {
|
||||
Name = "Set Everyone Into Random Vehicle",
|
||||
EffectId = "peds_seteveryoneintorandom",
|
||||
HideRealNameOnStart = true,
|
||||
TimedType = "None",
|
||||
EffectGroup = "_group_trafficspawner",
|
||||
EffectCategory = "TrafficSpawner"
|
||||
|
||||
}
|
||||
|
||||
function OnStart()
|
||||
vehicles = {}
|
||||
for _, model in ipairs(GetAllVehicleModels()) do
|
||||
table.insert(vehicles, model)
|
||||
end
|
||||
randomVehicle = random_choice(vehicles)
|
||||
vehicleHash = randomVehicle
|
||||
SetSurroundingPedsInVehicles(vehicleHash, 0)
|
||||
end
|
||||
|
||||
function OnStop()
|
||||
end
|
||||
|
||||
function OnTick()
|
||||
end
|
||||
|
||||
|
||||
function random_choice(p1)
|
||||
choice = p1[math.random(#p1)]
|
||||
return choice
|
||||
end
|
Reference in New Issue
Block a user