Weapons limiter beta

Made a map or mod? Announce it in this forum!

Moderator: Moderators

Post Reply
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Weapons limiter beta

Post by Elgan »

mhm i had a go at making one. im at a beta stage, Its really hard to test weapons limiting on my own so i need you guys:).


Right READ THE READ ME. If you cant read it ask on a forum. Any of the major ones i visit will do. here, mods r us [my home] and tmt.

it has a settings file inside the settings folder you place in main. There you setup what guns you want to replace with what guns or what guns you want to take or dissable. oh and what guns you wish to limit.

Items like binox , pistol, grenade you cant limit but can set to be taken or kept.


You can set a settings file for each map. This is done by making your own settings file and adding its name to the exec line that you place under wait till spawn in your map.scr.




Weapons limiter script By Elgan {sfx}

if you have any questions please visit www.mods-r-us.net ans ask or e-mailk me on elgan.sayer@gmail.com



install:
Put the pk3 and folder inside your main folder. usualy found at c:program files/ea games/mohaa/

You need to exec it from the maps you wish to run it from. This is so that you can have map's with diff weapon setups and normal without it running so no running scripts for no reason.

From your map.scr under level waittill spawn add the line.

exec weapon_limit/limiter.scr (optional: settings file name)

(optional: settings file name) = this means you do not have to include this part. You can jsut add the line like this.

level waittill spawn
exec weapon_limit/limiter.scr


or to have a map specific settings file you can send the name of the file to use. If you dont say what file to use it will use the default settings file inside the weapons_limiter_settings folder "weapons_limiter_settings.txt".

level waittill spawn
exec weapon_limit/limiter.scr MOHDM1_weapons_limiter_Settings.txt

This would make the mod look inside MOHDM1_weapons_limiter_Settings.txt for its settings. Though if it does not find the file it will not run.
It is VERY IMPORTANT that if you want a map specific settings file. You actualy create the file and place it in the settings folder as well as adding it's name to the exec line.


uninstall:
Delte everything.:D



Some info on setting the setting file. If you create your own settings file for a map please copy mine and rename it.



This part is for the main weapons that you want to limit or replace. You cant limit and replace a weapon at the same time , Just think about that., It wouldnt work.

Replace a weapon
----------------
These are the weapons.:D. TO set a weapon to be replaced. Enter the name of the weapon to replace it with in the second field.
e.g
The springfield sniper rifle below is being replaced with the bar.


dissalow a weapon
----------------
by setting the 3rd parameter of a weapon to 0. you can stop a weapon being used. When chosen the player will be made to pick another weapon.
e.g
The bar below is dissabled.


Limit a weapon
----------------
by setting the 3rd parameter of a weapon to any number you wish. You are limiting the ammount of this weapon in game.
If the weapon is all used up then the player will have to choose a diff weapon and they will be told what is available.

If you limited 1 of each sniper. 1 sniper per team. you would set the springfield to 1 and the KAR98sniper to 1. The first players to pick them will get a sniper. ANy others iwll have to pick a diff weapon.
when the player died or goes spectator. The weapon will become available again. When they respawn they will take it auto unless someone else chooses it when they die before they respawn.

e.g
The thompsonsmg is limited to 6 in the map. (this does not include picking up weapons).


Weapon Name Weapon name to replace weapon with Ammount to limit. Set 0 to dissable this weapon ( they will be given the choice to pick another ).
//Ally weapons This should be "" if u are swapping a weapon.
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"springfield" "bar" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"bar" "" "0"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"thompsonsmg" "" "6"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"bazooka" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"m1_garand" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//Axis
"kar98" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"KAR98sniper" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"mp40" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"mp44" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"panzerschreck" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//both
"shotgun" "" ""
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





Here you set if you want nay of these taken away. you cant limit them. Onlydissable them in this version.

The first param is just the name. The second is to keep or take the weapon. Setting the 2nd param to "1" will remove the weapon from the game.

the 3rd param is just what tik is used to remove the weapon. This is added so you can add custom items etc to be removed from players.

Weapon Name keep or take. 1 - take, tiki file it takes awak
//Ally weapons
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"colt45" "" "models/weapons/colt45.tik"
"m2frag_grenade" "" "models/weapons/m2frag_grenade.tik"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//Axis
"steilhandgranate" "" "models/weapons/steilhandgranate.tik"
"p38" "" "models/weapons/p38.tik"
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//both or items
"silencedpistol" "" "models/weapons/silencedpistol.tik"
"binoculars" "" "models/items/binoculars.tik"



Download here - http://mods-r-us.net/datas/users/75-bet ... Baa%7D.zip


oh and it used mike_torso so will confict with other mods you have with this file.
Last edited by Elgan on Fri Feb 25, 2005 12:49 pm, edited 1 time in total.
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

oh shit sorry i uploaded the wrong file!

i will replace the link. sorry!

fixed it now.

the old one wasnt mine. it was scorps or someonses that i had a look at to see what i was up agaisnt. Didnt steal nothing. it was useless.lol.
User avatar
Pollo_Expresss
Sergeant
Posts: 60
Joined: Thu Jan 08, 2004 12:18 am
Location: Spain

Thanks

Post by Pollo_Expresss »

Thanks Elgan, this is one of the things we?d been looking for in my clan since we start playing that game, hehe.

I only wanna give you a suggestion if you?re planning on making an upgrade. I think it would be fine to have an entnum limitation for the wapons. I mean that when you limit the rockets to 1 each team you aren?t sure that the one you want to carry it is going to have it the whole time. I think it would be interesting to allow one people to carry a weapon depending on his player number.

Well, if you arent planning to do that I would like to attempt to modify your thread myself (who knows, I could do something well in my life, hehe) to test it in our clan server.

Thanks again and good luck with your projects.
*(ICE)*-Sd_Pollo_Expresss
http://www.iceclanweb.net

Image
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

hmm sorry not sure i understand.

do you mean when picking they die the weapon doesnt stay? or..?
someoen told me they sud be able to pick up new weapons so i botherd putting spawn detection in. u cud remove that to detect each time they get a new weapon.

i will eventualy expand it for somehting im doin and do sh and bt versions.
User avatar
Pollo_Expresss
Sergeant
Posts: 60
Joined: Thu Jan 08, 2004 12:18 am
Location: Spain

Hehe

Post by Pollo_Expresss »

Well, sorry because my english isn?t very good.

I?ll try to explain it.

We have one people on each division of my clan that we call "artillero" (I don?t know very well how it?s translated but I think it could be "bazookaman" or something like that) and we don?t want no one else to carry the rocket launcher.

When you want to kick someone you can do it by his name or by his number in the server.

Well I thought that it could be possible to make a player the "bazokaman" using his number and to do something like that (sorry again, english isn?t the only thing I don?t know correctly, scripting too):

Code: Select all


   local.bazookaman = getcvar(bazookaman)

    for (local.i=0; local.i<=$player.size; i++)
            {
               if ( local.bazookaman != $player[i] )
                      take models/weapons/panzerschreck.tik
                      take models/weapons/bazooka.tik
               else
                      iprintln_nobold "You are the bazooka man"
             }
Well, I hope this helps my explanation...
Last edited by Pollo_Expresss on Mon Feb 28, 2005 12:06 am, edited 1 time in total.
*(ICE)*-Sd_Pollo_Expresss
http://www.iceclanweb.net

Image
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

you could simply set the settings file i provided to 1 bazooka. and 1 panzershreck.

thats 1 each team.

only 1 will be allowed, no one else can use it.
User avatar
Pollo_Expresss
Sergeant
Posts: 60
Joined: Thu Jan 08, 2004 12:18 am
Location: Spain

Only the choosen

Post by Pollo_Expresss »

Yes, I know I can do that and that?s really good.

But for me it would be great If I could chose the person that I want to carry the bazooka. Some stupid people get the bazooka and go crazy all over the map shooting anyway without taking a look to see if someone of his own team is in the way.

We have some people training specially in using this weapon to keep our teammates alive but killing a lot of enemies.

Well, it would be strange that someone were waiting the guy with the bazooka to death and then chose this weapon, but if it can be forbiden you can be sure he is not going to get the rockets.

Thanks again Elgan.
*(ICE)*-Sd_Pollo_Expresss
http://www.iceclanweb.net

Image
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

hmm thats a idea. a hard one.lol

so no one can select a weapon till the amdin chooses them? i think that wud have to be a specialist mod for urself.

hehehehe

maybe u cud just force the player to be a spectator so someone else cud be the bazooka.
User avatar
Pollo_Expresss
Sergeant
Posts: 60
Joined: Thu Jan 08, 2004 12:18 am
Location: Spain

Yep

Post by Pollo_Expresss »

Yep, that?s the point.

Well, you?re right, I can force a player to be a spectator and then my selected one could select the weapon.

Thanks again, hehe.

And very good job
*(ICE)*-Sd_Pollo_Expresss
http://www.iceclanweb.net

Image
Post Reply