Garrus2142/Slashers

Ammo Spawns

Closed this issue · 1 comments

Sodak commented

I have a Question in the randomplacement.lua ure using this function:

for k, v in pairs( mapData ) do

		if (v == mapData.Jerrican) then
			nbEntToSpawn = 3 *  math.ceil( (#player.GetAll() / 3) )
		else
			nbEntToSpawn = 0
		end

So if i have mapData Table: Ammo

i can use this function to spawn more ammo than just one right but dont want to use mathceil just a number like 3 ammos every round... and not calculating how much

am i right?

Sodak commented

And for Place Items on the Map u can Place it in Sandbox on the Map and use this little command to get the coordinates for the items:

concommand.Add( "entity_pos", function( ply ) local tr = ply:GetEyeTrace() if ( IsValid( tr.Entity ) ) then print( "Entity position:", tr.Entity:GetPos() ) print( "Entity position:", tr.Entity:GetAngles() ) else print( "Crosshair position:", tr.HitPos ) end end )