I fixed up this mod if anyone wants to try it out here is sample script there is one for each stock map. You can limit grenades, give weapons, take weapons. I used my weapons tik's I use so you would need to check that.
Like rockets are set with no ammo in tik so when you use the ammo box it give player a rocket with 2 rounds. And seeing as the ammo chest spawns randomly players can't camp waiting for it to show up and collect ammo.
I freely admit to stealing part of it from Gotcha capture manon mod, I couldn't figure out the random array so I used part of his mod, Sorry Gotcha but I did learn something on how to do it for next time. And the ammo chest thing I found on TMT
don't remember who made that I been reading posts for 4 days now...lol
Code:
//=============================================================================================================================
// This mod spawns a ammo chest in different locations on maps. Each location is random. It's exec'd from DMprecache so if you
// are using a mod that also has a DMprecache you will need to add " exec mods/mods.scr to the one in your mod. This mod works
// with or without the Reborn patch.
//
// Should work for AA SH or BT you just need to check the weapons I only made it for AA weapons.
//
// NOTE: You need to add set mods 1 in server.cfg to start mod, this is so you can turn it on or off for scrims.
//
//=============================================================================================================================
// I made this mod by using a script for the ammo chest from a post on TMT, and ripped off the
// random array section from Gotcha's post on X-Null I combined the two, I just kept working at it ( 2 days...lol I'm Old )
// and until it worked.
// http://www.x-null.net/forums/showthread.php/2644-Capture-the-Manon-bugs-and-issues?highlight=random+triggers
//============================================================================================================================
Main:
thread dm7ammo
end
dm7ammo:
//Add or Remove locations
level.spot[0] = ( 1217.07 -123.44 -59.88 )
level.spot[1] = ( -1341.72 -1163.03 -55.88 )
level.spot[2] = ( -3062.78 -656.22 -105.88 )
level.spot[3] = ( -3005.93 423.41 -107.88 )
level.spot[4] = ( -1653.96 -531.50 -151.88 )
level.spot[5] = ( -177.08 -11.83 40.13 )
level.spot[6] = ( -745.03 -263.49 -111.88 )
level.spot[7] = ( -133.05 -498.88 -199.88 )
level.spot[8] = ( -1773.66 352.74 -119.88 )
level.spot[9] = ( 837.58 -1219.16 40.13 )
level.spot[10] = ( -168.50 1018.30 -135.88 )
level.spot[11] = ( -1560.40 -1108.98 -283.88 )
level.spot[12] = ( 268.39 1705.54 -135.88 )
//level.spot[13] = ( )
//level.spot[14] = ( )
//level.spot[15] = ( )
//level.spot[16] = ( )
//level.spot[17] = ( )
// makes it spawn to random locations
local.random = randomint((level.spot.size )-1)
//Spawn Model
local.model = spawn script_model
local.model model "models/static/trunk.tik"
local.model.origin = level.spot[local.random]
local.model.scale = 1
local.model light 1 1 1 50
local.model targetname ammo
//Spawn trigger
local.trig = spawn trigger_use
local.trig targetname ammotrigger
local.trig.origin = ( local.model.origin ) //i have changed this part because whorks for me the trigger spawn straigh away
local.trig setsize ( -20 -20 0 ) ( 20 20 80 )
local.trig setthread gotammo
//$ammotrigger waittill trigger
gotammo:
local.player = parm.other
if(local.player == NULL) end
$ammotrigger waittill trigger
local.player = parm.other
// remove slashs to take nades
// if ( local.player.dmteam == "allies" || local.player.dmteam == "axis" )
// {
// local.player take "models/weapons/m2frag_grenade.tik"
// local.player take "models/weapons/steilhandgranate.tik"
wait 0.25
if ( local.player.dmteam == "allies" )
{
// remove slashs to give nades
//local.player give "models/weapons/m2frag_grenade.tik"
// Adjust weapons and ammo here
local.player give "models/weapons/bazooka.tik"
local.player ammo rifle 100
local.player ammo pistol 14
local.player ammo smg 200
local.player ammo mg 200
local.player ammo shotgun 30
local.player ammo heavy 2
local.player ammo grenade 1
wait .5
// Change message here
local.player stufftext "say You picked up ammo & a bazooka"
}
if ( local.player.dmteam == "axis" )
{
// remove slashs to give nades
//local.player give "models/weapons/steilhandgranate.tik"
local.player give "models/weapons/panzerschreck.tik"
local.player ammo rifle 100
local.player ammo pistol 14
local.player ammo smg 200
local.player ammo mg 200
local.player ammo shotgun 30
local.player ammo heavy 2
local.player ammo grenade 1
wait .5
// Change message here
local.player stufftext "say You picked up ammo & a panzerschreck"
}
// remove slashs to take nades
//}
$ammo delete
$ammotrigger delete
// Adjust time for ammo chest to respawn here
wait 20
thread dm7ammo //ammogive
end
Here is the mods.scr you can exec other mods from it if you want to, I like doing oit like this so things can be turned on or off in console or from a menu.
Code:
main:
level.mods = (getcvar (mods))
if(level.mods == "1")
{
thread mods
}
end
mods:
level waittill spawn
if (level.mods == "0")
end
level.mapname = getcvar (mapname)
switch ( level.mapname )
{
case "dm/mohdm1":
{
exec mods/map/dm/ammo1.scr
}
break
case "dm/mohdm2":
{
exec mods/map/dm/ammo2.scr
}
break
case "dm/mohdm3":
{
exec mods/map/dm/ammo3.scr
}
break
case "dm/mohdm4":
{
exec mods/map/dm/ammo4.scr
}
break
case "dm/mohdm5":
{
exec mods/map/dm/ammo5.scr
}
break
case "dm/mohdm6":
{
exec mods/map/dm/ammo6.scr
}
break
case "dm/mohdm7":
{
exec mods/map/dm/ammo7.scr
}
break
case "obj/obj_team1":
{
exec mods/map/obj/ammo1.scr
}
break
case "obj/obj_team2":
{
exec mods/map/obj/ammo2.scr
}
break
case "obj/obj_team3":
{
exec mods/map/obj/ammo3.scr
}
break
case "obj/obj_team4":
{
exec mods/map/obj/ammo4.scr
}
break
default:
// error? ignore?
end
}
end