well u cud easily make a add on to admin pro that does that. You could even make it switchable on and off via console and make all its cmds via console.
I will talk you through the whole process

. The mod wil add to the state file as a new script under weapons raise.
i will call this mod "custom", you can use whatever name you like. I have yet to write all this in the help files so any q's, ask.
I will cover adding "custom" to the state file as well as the mods.txt. I will also create a custom settings file and cover the commands for getting the info from the settings file. in "custom" i will also show u how to make the mod turn on and off via console by adding 1 or 2 lines of check script. ALl the console and cvar handling is done for you.
Stage A, Creating the script.
How to make a script that gives a weapon a custom dmbulletdamage and firedelay
1. Create a script named custom.scr. Place this script in global. The full path of this script will now be global/custom.scr
2. Open the script up and add the main thread. The self object of the thread will eb the player as it is executed from the state files everytime a weapon is changed/picked up. 'raised'.
First we want to check if the mod is "on". If it's not then we exit. TO do this we check the level.run array. This array has all the mods on and off settings. the settings are in a string, However thats no problem. 1 is on and 0 is off.
We acess the mod we want with the name of the mod.
Code: Select all
main:
// If custom is not on then exit
if(level.run["custom"] != "1")[end}
end
ok, thats it for on and off checking. If the mod is turned off in console this will update and the mod will stop running.
Now we must script some actual behaviour. to get settings we just exec the settings.scr:;getcmd and wait for the result. Thats easy

. However you will probably want damn weapon specific settings. Well i didnt really write a clean way to add weapon specific mods yet. as i didnt think i would use it more then once. However this would be the 3rd time its been in use.
The script below. Gets a list of specific weapons from a weapon specific list in the settings file linked with this mod. game.file ["custom"]
It then loads the weapons into the main commands list and keeps track of where they are. THen when it needs a weapon it loops through and find it, It then returns the setting. if the setting is 0 . Then nothing is set to change and it doesnt change anything.
Code: Select all
main:
// If custom is not on then exit
if(level.run["custom"] != "1")[end}
//Mod is on if we got this far.
// get the new damamge for the weapon
local.settings = waitthread check_weapon self
// the first damage bit is the first setting in the array
local.damage = int local.settings[0]
local.firedelay = int local.settings[1]
// if a new damage is set then change it to new setting
if(local.damage != 0)
{
self weaponcommand duel dmbulletdamage local.damage
}
// if a new firedelay is set then change it to new setting
if(local.firedelay != 0)
{
self weaponcommand duel dmfiredelay local.firedelay
}
end
check_weapon local.player:
if(local.player.dmteam=="spectator" || local.player == NIL || local.player == NULL)
{
end
}
// if the setting aare missing load them
if(game.custom_weapons==NIL)
{
waitthread load_weapons
}
self.weapon = NIL
self waitexec global/get_weapon.scr
// determine the weapon of the player.
local.true = 1
for(local.true =0;local.true <= 1; local.true++)
{
wait 1
if(self.weapon==NIL)
{
while(self.weapon==NIL)
{
if(self == NULL || self == NIL)
{
end
}
waitframe
}
}
if(self.weapon != "models/weapons/unarmed.tik")
{
local.true = 2
}
waitexec global/get_weapon.scr
}
// check for the weapon in the settings list and return the parameter for damage.
for(local.load=game.custom_weap_start;local.load<=game.all_commands.size;local.load++)
{
if((self.weapon + "-custom") == ("models/weapons/" + game.all_commands[local.load][1]))
{
// return new settings
local.custom[0] = game.all_commands[local.load] [2]
local.custom[1] = game.all_commands[local.load] [3]
end local.custom
}
}
end
load_weapons:
// Load the settings depending on the game
switch(game.game)
{
case "AA":
game.custom_weapons = waitexec game.file["custom"]::weaponsaa
break
case "SH":
game.custom_weapons = waitexec game.file["custom"]::weaponssh
break
case "BT":
game.custom_weapons = waitexec game.file["custom"]::weaponsbt
break
}
// crea a game variable to keep track of the setting.
local.i = game.all_commands.size
game.custom_weap_start = local.i
for(local.n=1;local.n<=game.custom_weapons.size;local.n++)
{
local.i++
for(local.s=1;local.s <= game.custom_weapons[local.n].size; local.s++ )
{
if(local.s == 1)
{
game.all_commands[local.i][local.s] = (game.custom_weapons[local.n][local.s] + ".tik-custom")
}
else
{
game.all_commands[local.i][local.s] = (game.custom_weapons[local.n][local.s])
}
}
}
end
If something is found then the new damage is given to the weapon. etc
Stage b. Settings
ok. now your script is there. Now we have to make the settings file. We also have add the mod "custom" to the mods.txt or it wont get loaded and nothing will work because level.run["custom"] will not be 1.
ok, lets add it to the mods.txt mod array. THis is simple adding like the others. It MUST be named custom, The same as in the script so it can link with gamefile and level.run. The map list etc can be whatever you like. THe pat to the script can be "none" also because it is loaded by the state file. The setting file can be wherever you like also as long as that is actualy where you add it. game.file contains the pat to the settings file for the mod.
So now lets add it.
Code: Select all
main: // |
local.scripts = makearray // |
// \|/
// Mod Name // ON or Off. ( "1" = ON. "0" = OFF) //Help and about //Path to mod script, Set "none" if none. //Maps list ("all" for all maps) // game type list ("all" for all game types. // Settings file. Specify the path to the settings file // Map Specific
//-----1---------------------------------2---------------------------------------------------3-----------------------------------------------------------------------------4-------------------------------------------------------------------5----------------------------------------------------------------------6----------------------------------------------------------------------------7-------------------------------------------------------------8----------------------------------------------------------------------------------------------------------------------------------------------------------------
"weapons-limiter" "0" " limit weapons or just take, swap them" weapon_limit/weapons_limiter.scr all all settings/weapons-limiter "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"spawn-protection" "1" " Protect spawning in AA. Wont run in SH or BT" global/ac/spawn_protection_setup.scr all all settings/spawn-protection "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"camper" "0" " Turns camper on and off 1=On, 0 = OFF" global/anti_camper.scr all all settings/camper "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"cvar-forcing" "0" " Turns cvar forcing on or off. 1= on, 0 = off" global/ac/cvar_forcer.scr all all settings/cvar-force "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"team-balance" "0" " Turns Jim's team balance on or off. 1= on, 0 = off" global/ac/team_balance.scr all settings/team-balance.txt::gametypes settings/team-balance "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"music" "0" " Play music to players depending on settings" global/ac/music.scr all all settings/music "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"mines" "0" " Random, stickybombs, proimity, plant mines" global/ac/mines/mines.scr settings/mines.txt::maps settings/mines.txt::gametypes settings/mines "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"time-alive" "1" " Count time alive for" "none" all all "none" "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"spec-eye" "0" " Spectators use eyes of person they spectate " global/ac/spec_eye.scr all all "none" "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"message-center" "1" " Server Messages using hud Draw" global/ac/server_messages.scr all all settings/message-center "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"medics" "0" " Players can heal other players" global/ac/medics/setup.scr all all settings/medics "0"
//Game types
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"countdown" "0" " Each team must find and hold the radio" HTR/setup.scr all all settings/countdown "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"survivor" "0" " Battle until you have no lives" Survivor/setup.scr all all settings/survivor "0"
//
// CUSTOM ADD ON
"custom" "1" "whatever i want" "none" all all settings/custom "0"
endarray
end local.scripts
now its there loading on all game types and all maps. The settings file we make wwill be called 'custom' and placed inside the settings folder. The path we add to the mods list is thus 'settings/custom'
Now in the settings file we must create some weapon specific setting thread, named weaponsAA, or weaponsSH for SH etc. Because it looks for these in the script.
Code: Select all
game.custom_weapons = waitexec game.file["custom"]::weaponsaa
game.file["custom"] would be settings/custom.txt
So the whole thing is.
settings/custom.txt::weaponsaa
so really the same as. however game.file changes if you change the mods.txt
Code: Select all
game.custom_weapons = waitexec settings/custom.txt::weaponsaa
2. Make the settings file!
now in the settings file we must list the weapons with 2 parameters, 1 for damage and 1 for firedelay as we check for 2 in the script.
go to the medics and camper and copy the whole list over and make a new text file named 'custom', paste them inside.
you then must add a new section and change the wording and its done!
Code: Select all
// set a main thread with a dummy array so settings loading dont give //errors when it finds no settings. All settings are loaded by itself.
main:
local.dummy = makearray
endarray
end local.dummy
// Allied Assault
weaponsaa:
local.weapons = makearray
//weapon name //weapon damage //fire delay
"bar" "" ""
"bazooka" "" ""
"kar98" "" ""
"kar98sniper" "" ""
"m1_garand" "" ""
"mp40" "" ""
"mp44" "" ""
"panzerschreck" "" ""
"shotgun" "" ""
"springfield" "" ""
"thompsonsmg" "" ""
"unarmed" "" ""
endarray
end local.weapons
// SPEARHEAD
weaponssh:
local.weapons = makearray
//weapon name //weapon damage //fire delay
"bar" "" ""
"bazooka" "" ""
"kar98" "" ""
"kar98sniper" "" ""
"m1_garand" "" ""
"mp40" "" ""
"mp44" "" ""
"panzerschreck" "" ""
"shotgun" "" ""
"springfield" "" ""
"thompsonsmg" "" ""
"enfield" "" ""
"g43" "" ""
"mosin_nagant_rifle" "" ""
"ppsh_smg" "" ""
"sten" "" ""
"svt_rifle" "" ""
"kar98_mortar" "" ""
"unarmed" "" ""
endarray
end local.weapons
// BREAKTHROUGH
weaponsbt:
local.weapons = makearray
//weapon name //weapon damage //fire delay
"bar" "" ""
"bazooka" "" ""
"delisle" "" ""
"enfield" "" ""
"g43" "" ""
"gr_w_minedetector" "" ""
"it_w_breda" "" ""
"it_w_carcano" "" ""
"2it_w_howitzerdes" "" ""
"it_w_moschetto" "" ""
"kar98" "" ""
"kar98sniper" "" ""
"kar98_mortar" "" ""
"m1_garand" "" ""
"mosin_nagant_rifle" "" ""
"mp40" "" ""
"mp44" "" ""
"panzerschreck" "" ""
"ppsh_smg" "" ""
"shotgun" "" ""
"springfield" "" ""
"sten" "" ""
"svt_rifle" "" ""
"thompsonsmg" "" ""
"1uk_w_l42a1" "" ""
"uk_w_piat" "" ""
"uk_w_vickers" "" ""
"us_w_minedetector" "" ""
"unarmed" "" ""
endarray
end local.weapons
I just took the one form medics and did replace all on help to "".
now if u changed "" to anything in the first section the new damage for the gun will be what you set.
finished!
"bar" "1" "23"
damage of 1,. fire delay of 23.
Hope that helps!
if u do admin_cmd "help"
you will notice you have a load of new settings. These will be called "custom-bar"
or something, i think.hehe because when i added them in the script to the settings list i added "custom-" to it. So it will not conflict with the ones from camper which are in the settings list as the name of the weapon on its own.
now i typed all these and copied from the ones already made and changed them in here so maybe i did make some msitakes more than just spelling and english. sorry about them:\
You dont have to add anything to mods.txt. Thats just for gaining the ona nd off feature. You could have it load the settings normaly from a file if u specify the static path to the file in the script.