View Single Post
Plugin Info:     Modification:          Category:         
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-23-2014 , 20:58   Random Weapons Mod
Reply With Quote #1

Hey, guys! So, let's explain the story. Soon I've got the idea of how funny will this be - a mod, where on each spawn you get random pack of weapons. So, my first work was to search, and I found one mod like this, and it was approved. But I thought that I could make maybe a better one with a code optimized and more features. Now to describe the plugin:


.: Description :.

This plugin is a simple mod, which gives a random weapon pack (primary, pistol and a grenade) on each spawn. I think it'll be good for classic/dust2/other fun mods. Also, if you want your server to be based on this mod, you can use the plugin, which restricts the buyzone (good combinations between the two plugins).


.: Features :.

First of all, you can easy control almost all of them by cvars.
- One of the options is to give random weapons on player, only when he died before the spawn. Otherwise, if he was alive untill the new spawn, he will keep his previous weapon.
- There is also an options to control the giving of each part of the weapon pack. You can turn on and off the giving of primary weapons, pistols or grenades - separately. If a part from the pack is disabled, the user will keep his previous weapon from this part.
Example: If you have disabled the giving of pistols, you get spawned, get new random primary weapon, get new random grenade, but you keep your previous pistol.
- An extra option, unlimited BPammo for the CSDM servers.
- Another extra option, getting armor and vesthelm with each weapon pack.
- On every spawn you will see a information message with what you received this time. this message also depends of the cvars and gets automatically changed if you turn off/on some part of the weapon pack.
- Cvar for the prefix on that info message. See it in the list of cvars.


.: Cvars :.

1. The main type of giving:
random_weapons_only_killed (default: 0)
/0 - gives new random pack on EACH spawn/
/1 - gives new random pack on spawn, but ONLY if you died before! - /
/If it is to 1, you will keep your previous weapon if you didn't die before the spawn/

2. Turn on/off the giving of each part of the pack:
random_weapons_primary (default: 1)
/1 - will give random primary weapons in the conditions defined by the cvar above/
/0 - will NEVER give random primary weapons/
random_weapons_pistols (default: 1)
/1 - will give random pistols in the conditions defined by the cvar above/
/0 - will NEVER give random pistols/
random_weapons_grenades (default: 1)
/1 - will give random grenades in the conditions defined by the cvar above/
/0 - will NEVER give random grenades/

3. The cvar for unlimited bpammo:
random_weapons_unlimited_ammo (default: 0)
/1 - will give unlimited ammo for each weapon/
/0 - will give the normal ammo for each weapon/

4. The cvar for vesthelm and armor:
random_weapons_vesthelm_bonus (default: 0)
/1 - will give vest + helmet for each weapon pack/
/0 - won't give vest + helmet for each weapon pack/

5. The cvar for message prefix:
random_weapons_prefix (default: "^x03[^x04Random Weapons^x03]")
/*You can adjust the colors by the well known color system/

.: Credits :.
- @Blizzard_87 - for very helpful 'private' tutorial of working with enums. Thanks a lot!
- @EthicalHacker007 - suspected very main bugs and also gave some suggestions.

Hope you will enjoy it! Waiting for your comments!
Attached Files
File Type: inc stripweapons.inc (4.5 KB, 780 views)
File Type: inc colorchat.inc (5.9 KB, 535 views)
File Type: sma Get Plugin or Get Source (RandomWeapons.sma - 1963 views - 8.0 KB)
__________________

Last edited by Flick3rR; 07-30-2014 at 18:59.
Flick3rR is offline
Send a message via Skype™ to Flick3rR