Snarkpit Articles


Remove Weapons



Firstly, we will learn how to remove weapons from a player at round start.
Make a map, and place the entity player_weaponstrip, and don't change any properties.

Give Weapons



Now, we've learned to weaponstrip. Now, you will learn how to give every single player a specific weapon (Or multiple). Add an entity called game_player_equip. Don't give it any name (unless you want to trigger the equip). Choose for example Give Knife and choose Yes or No depending on if you want the players to start with a knife, or not. If you want to give other weapons, you can turn off Smart Edit, and add properties. Here is a list over properties available:

weapon_usp 1
weapon_glock18 1
weapon_deagle 1
weapon_p228 1
weapon_elite 1
weapon_fiveseven 1
weapon_m3 1
weapon_xm1014 1
weapon_mp5navy 1
weapon_tmp 1
weapon_p90 1
weapon_mac10 1
weapon_ump45 1
weapon_ak47 1
weapon_sg552 1
weapon_m4a1 1
weapon_aug 1
weapon_scout 1
weapon_awp 1
weapon_g3sg1 1
weapon_sg550 1
weapon_m249 1
item_kevlar 1
item_assaultsuit 1
weapon_flashbang 1
weapon_hegrenade 1
weapon_smokegrenade 1
item_thighpack 1
weapon_knife 1
(These are CS 1.5 values, but most of them should work for 1.6.)

To give them a weapon, you choose 1 at the property value. If you want to give them more ammo, you write a higher number at the value. You can also choose to give every player AWM, AK and Colt smiley

Place Weapons



NOTICE: If you use this AND the give method, the map will probably halt after a couple of minutes on the server! I do not know why, but it has always been that way when I did this mistake.

Now on to placing a weapon on the ground! Find the entity armoury_entity, and put it exactly where you want the weapon to appear. Most likely in aim maps, you would put in in front of the player, or below the player.
Use the properties:

Item The weapon you want to give the player. Check the list above to choose something that's not in the list.
Count If you write 2, the entity will contain 2 pieces of the weapon you chose. If you pick the weapon up, it will still be one there, untill it's no more weapons left in that entity.

That's all for now, please do write comments/questions and such smiley

Sorry that it's no pictures, but it's really not needed.


Post ReplyView Topic
Discussion
[author]
Posted by Mor7y on Sun Jan 2nd 2005 at 6:57pm

Gorgieboy, the player_weaponstrip can be placed where-ever you want it to be placed. It will be activated every round.
0 starsPosted by gorgieboy on Wed Dec 29th 2004 at 3:39pm

Where do you place the player_weaponstrip?

because mine isnt working
0 starsPosted by Junkyard God on Tue Nov 23rd 2004 at 6:57pm

Thats coded in, the vip is a complete different spawn type and model type, it's in some code that a vip has always got a hand gun

about the tutorial,

pretty nice, it does what it says smiley
[author]
Posted by Mor7y on Tue Nov 9th 2004 at 9:59pm

No.
0 starsPosted by Andrei on Tue Nov 9th 2004 at 6:42pm

Does this also determine if a player is/isn't allowed to buy a certain weapon (like on as_oilrig)?
0 starsPosted by Sinner_D on Tue Nov 9th 2004 at 12:32am

Not a bad tut, pix would helped somewhat. however i think you should add that modified versions of an fgd file can give you more options...i know myn doesnt allow me to place the handguns.

also the fact that you can rotate the gun, and also stand it up on its side...other then that, the tut covers the basics.

btw, if anyone has a modified version that does allow the placing of handguns, please hit me up with a DL link PLZ
Post ReplyView Topic