Intro:
I've listened to many suggestions and requests about a plugin, which to have a menu only with snipers to buy. I didn't find similar one, but if there already is, please excuse me. I think this plugin may be usefull for CSDM or Surf servers, where the owners doesn't want to have free snipers and campers with them everywhere.
Description:
- The menu includes the 4 snipers: AWP, G3SG1, SG552, Scout.
- Each of them can be turned on/off from the menu with cvars. If the sniper is turned off, it gets unclickable and it's name in the menu changes, also the color.
- Snipers' prices can also be changed via cvars.
- I've also added a bonus deagle option, for the fun servers - whoever likes this add, it could be also turned on/off with cvars.
*That bonus deagle option can refer to givin deagle with every sniper and giving deagle by chance with percent, which is also constrolable vie cvar.
- Also included a chat messages prefix, which you can change with cvar.
CVARs:
1. Turning on/off the snipers:
sniper_awp_on
/Turns on/off the AWP/
sniper_g3sg1_on
/Turns on/off the G3SG1/
sniper_sg552_on
/Turns on/off the SG552/
sniper_scout_on
/Turns on/off the Scout/
*All the snipers are turned on by default.
*1 - sniper will appear in the menu.
*0 - sniper won't be in the menu.
2. The prices of the different snipers:
sniper_awp_cost (default: 10000)
/The price of the AWP/
sniper_g3sg1_cost (default: 12000)
/The price of the G3SG1/
sniper_sg552_cost (default: 12000)
/The price of the SG552/
sniper_scout_cost (default: 7000)
/The price of the Scout/
3. And here is the Bonus Deagle cvar:
sniper_deagle_bonus (default: 0)
/If 0, won't give bonus deagle/
/If 1, it will give a bonus deagle with every sniper/
/If 2, it will give a chance to give sniper, which percent of chance you can control with cvar/
sniper_deagle_chance_percent (default: 25)
/This cvar is important only if the cvar above is set to 2/
/That's the percent of chance to give a deagle bonus with the sniper/
/In every different opening of menu, the chance will be checked again/
4. The chat prefix (it will be green):
sniper_message_prefix (default: [Prefix])
And here is another cvar, which defines the main function - the type of giving the sniper, and deagle if defined by cvars.
5. Giving the sniper type:
sniper_give_type (default: 1)
/0 - Only adds the sniper to the other weapon of the player. And now he will have two guns - the previous weapon and the sniper/
/1 - Will strip user primary weapons and give him only a sniper/
Changelog:
Code:
-------------Version 1.1--------------
- Rewrote the whoole code to a brand new level
- Added the bonus deagle chance option
- Renew the cvar getting type
- Renew the main style of menu
- Renew the checks for turning om/off the snipers
Credits:
- @
Blizzard_87 - the whole idea and the helpful example of working with enums. Great idea for this method, thanks a lot!
You should compile the plugin localy, because of the includes needed. They are attached in the thread.