Raised This Month: $32 Target: $400
 8% 

Random Weapons Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
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, 775 views)
File Type: inc colorchat.inc (5.9 KB, 532 views)
File Type: sma Get Plugin or Get Source (RandomWeapons.sma - 1960 views - 8.0 KB)
__________________

Last edited by Flick3rR; 07-30-2014 at 18:59.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
chetan jaiswal
Junior Member
Join Date: Nov 2013
Location: india
Old 05-23-2014 , 23:53   Re: Random Weapons Mod
Reply With Quote #2

Nice job.
__________________
Never try to beat me!
chetan jaiswal is offline
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 05-24-2014 , 02:43   Re: Random Weapons Mod
Reply With Quote #3

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 ?
swapped is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-24-2014 , 04:07   Re: Random Weapons Mod
Reply With Quote #4

'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..
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Egan
BANNED
Join Date: May 2013
Location: GB
Old 05-24-2014 , 09:46   Re: Random Weapons Mod
Reply With Quote #5

isn't their a plugin doing the same thing ? what makes yours better ?
https://forums.alliedmods.net/showthread.php?p=646639
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-24-2014 , 11:54   Re: Random Weapons Mod
Reply With Quote #6

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!
__________________

Last edited by Flick3rR; 05-24-2014 at 12:23.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Egan
BANNED
Join Date: May 2013
Location: GB
Old 05-24-2014 , 12:37   Re: Random Weapons Mod
Reply With Quote #7

Quote:
Originally Posted by Flick3rR View Post
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
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
blanko
Senior Member
Join Date: Aug 2008
Old 05-24-2014 , 13:58   Re: Random Weapons Mod
Reply With Quote #8

Thank you for the plugin, but the idea for this was MINE, NOT YOURS!!
Proof: https://forums.alliedmods.net/showthread.php?t=240667
__________________
blanko is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-24-2014 , 14:21   Re: Random Weapons Mod
Reply With Quote #9

Dude... Seriously? That was a request, I've made it. But I got that idea long time before this...
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Egan
BANNED
Join Date: May 2013
Location: GB
Old 05-24-2014 , 15:00   Re: Random Weapons Mod
Reply With Quote #10

Quote:
Originally Posted by blanko View Post
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
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:03.


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