AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Random Weapons Mod (https://forums.alliedmods.net/showthread.php?t=240875)

Flick3rR 05-23-2014 20:58

Random Weapons Mod
 
3 Attachment(s)
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!

chetan jaiswal 05-23-2014 23:53

Re: Random Weapons Mod
 
Nice job. :)

swapped 05-24-2014 02:43

Re: Random Weapons Mod
 
Quote:

radnom_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/
radnom_weapons_pistols (default: 1)
/1 - will give random pistols in the conditions defined by the cvar above/
/0 - will NEVER give random pistols/
radnom_weapons_grenades (default: 1)
is random or radnom ?

Flick3rR 05-24-2014 04:07

Re: Random Weapons Mod
 
'random', sorry about this. Like I made that mistake a thousand times during making it. And then I've been wondering why the cvar's don't work..

Egan 05-24-2014 09:46

Re: Random Weapons Mod
 
isn't their a plugin doing the same thing ? what makes yours better ?
https://forums.alliedmods.net/showthread.php?p=646639

Flick3rR 05-24-2014 11:54

Re: Random Weapons Mod
 
Didn't mean that plugin in the thread..
Well It's just a random weapons giving plugin, while the other one does a lot of different things, and I didn't understand if it has the option to give some random weapons - it's with chance I think? Also, my one is pretty simple, for users who want only this. I don't know, not arguing with anyone. Let who should make a decision about it. I think they are different at all, but you decide which to use. Greetings, no bad feelings!

Egan 05-24-2014 12:37

Re: Random Weapons Mod
 
Quote:

Originally Posted by Flick3rR (Post 2141947)
Didn't mean that plugin in the thread..
Well It's just a random weapons giving plugin, while the other one does a lot of different things, and I didn't understand if it has the option to give some random weapons - it's with chance I think? Also, my one is pretty simple, for users who want only this. I don't know, not arguing with anyone. Let who should make a decision about it. I think they are different at all, but you decide which to use. Greetings, no bad feelings!

well lets see :3

blanko 05-24-2014 13:58

Re: Random Weapons Mod
 
Thank you for the plugin, but the idea for this was MINE, NOT YOURS!!
Proof: https://forums.alliedmods.net/showthread.php?t=240667

Flick3rR 05-24-2014 14:21

Re: Random Weapons Mod
 
Dude... Seriously? That was a request, I've made it. But I got that idea long time before this...

Egan 05-24-2014 15:00

Re: Random Weapons Mod
 
Quote:

Originally Posted by blanko (Post 2141988)
Thank you for the plugin, but the idea for this was MINE, NOT YOURS!!
Proof: https://forums.alliedmods.net/showthread.php?t=240667

mm so what... that does change anything :| we just need to see which is better, the one exolent made or Flick3rR's


All times are GMT -4. The time now is 15:29.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.