5 Attachment(s)
Let mappers place spawns of hydra, hunter and rhino
№1
Let mappers place (or don't) spawns of hydra, hunter and rhino, like spawns of classes. They must use cylinders with size 1.
Rhino:
color = rgb{255, 0, 128}, hex{ff0080}
Hunter:
color = rgb{0, 255, 255}, hex{00ffff}
Hydra:
color = rgb{255, 153, 0}, hex{ff9900}
№2
Make random amount of hydras, hunters and rhinos to every map:
0 - 3 hunters
0 - 2 tanks
0 - 1 hydra
If mapper didn't place markers for these vehicles so don't spawn them.
If mapper placed one cylinder (applicable to another amount of cylinders), then no more than one hunter/hydra/rhino will must to spawn.
If amount of hydra/hunter/rhino at current map is less than amount of cylinders, then spawn vehicle(s) at random cylinder.
OR
Hunter/rhino/hydra must to spawn at server's "markers" or at mapper's markers with random amount. Thanks to Noc^ for that idea.
Important update:
This code spawns hunters and rhinos with random amount (0-3)
Code
Shitcode, but works :)
Code:
spawns = {
Hunter = { {-1296, -137, 15}, {-1290, -137, 15}, {-1302, -137, 15} },
Rhino = { {-1284, -137, 15}, {-1280, -137, 15}, {-1274, -137, 15} }
}
vehicles = { Hunter = 425, Rhino = 432}
-- i copied that from net
function deepcopy(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[deepcopy(orig_key)] = deepcopy(orig_value)
end
setmetatable(copy, deepcopy(getmetatable(orig)))
else
copy = orig
end
return copy
end
function spawnVehicles()
tempSpawns = deepcopy(spawns) -- we copy table to avoid spawning two vehicles in one place and we will delete place after vehicle spawning
for key,_ in pairs(tempSpawns) do
local i = 0
vehAmount = math.random(0, 3)
while i < vehAmount do
randomSpawn = math.random(1, #tempSpawns[key])
createVehicle (vehicles[key], tempSpawns[key][randomSpawn][1], tempSpawns[key][randomSpawn][2], tempSpawns[key][randomSpawn][3])
table.remove(tempSpawns[key], randomSpawn)
i = i + 1
end
end
end
addEventHandler ( "onResourceStart", getRootElement(), spawnVehicles) -- change this to onRoundStart, admins ;)
Re: Let mappers place spawns of hydra, hunter and rhino
Re: Let mappers place spawns of hydra, hunter and rhino
Re: Let mappers place spawns of hydra, hunter and rhino
Just bring the old system back which mappers could add hunter/hydra onto their maps. There wont be any problem as you have anti-spray system for them ;)
Re: Let mappers place spawns of hydra, hunter and rhino
The idea is good but I disagree with this point:
Quote:
Originally Posted by
ApeLsiN4eG
If mapper didn't place markes for these vehicles so don't spawn them.
Because if the idea gets applied then random spawns of those vehicles would dissapear in the old maps.
My suggestion would be: If you don't add any marker for those vehicles, they will spawn in some random location.
Also if you don't use all markers, the remaining vehicles would appear in some random location.
Ex: You can set 3 markers for hunter but you just used 2, then the remaining one will spawn in some random location.
If you don't want any of those vehicles in your map just use this script (made by you xd).
Re: Let mappers place spawns of hydra, hunter and rhino
Quote:
Originally Posted by
Noc^
The idea is good but I disagree with this point:
Because if the idea gets applied then random spawns of those vehicles would dissapear in the old maps.
My suggestion would be: If you don't add any marker for those vehicles, they will spawn in some random location.
Also if you don't use all markers, the remaining vehicles would appear in some random location.
Ex: You can set 3 markers for hunter but you just used 2, then the remaining one will spawn in some random location.
If you don't want any of those vehicles in your map just use
this script (made by you xd).
P.S: Since you created that script, would be fine if you create a script to ban hydras too, because it got added after you released your "ban hunters and rhino" script.
he made a script to ban hydra, tank and hunter
Re: Let mappers place spawns of hydra, hunter and rhino
mappers doing what they want
Re: Let mappers place spawns of hydra, hunter and rhino
Quote:
Originally Posted by
TKN
Just bring the old system back which mappers could add hunter/hydra onto their maps. There wont be any problem as you have anti-spray system for them ;)
1. Player can learn locations of hunter/hydra/rhino. It turns to "who will take hunter/hydra/rhino first and kill presi". Therefore, must be random.
2. Mappers can put fixed amount of hunters/hydra/rhinos and as much as they want. It is bad. Must be random.
Re: Let mappers place spawns of hydra, hunter and rhino
Nop, I mean, I don't like this new system - random hunters, hydras, rhinos spawns, but it's still better. Bad if mapper add them because later only mapper and his friends know where are those shits and it's not fair for othe players.
Re: Let mappers place spawns of hydra, hunter and rhino
Quote:
Originally Posted by
Noc^
P.S: Since you created that script, would be fine if you create a script to ban hydras too, because it got added after you released your "ban hunters and rhino" script.
I updated my script and added Hydra, but I can not change title of thread.