AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM (https://forums.alliedmods.net/showthread.php?t=172033)

LumiStance 11-14-2011 02:06

[CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
2 Attachment(s)
Description
Provides a menu to choose weapons. Once choosen the weapons are automatically given at respawn.
The avaible weapons are configurable (see configuration below). The menu also provides a choice
of no gun or random. Bots are given the same items as players and random guns.

The plugin can also be configured to give health, armor, helmet, flashbangs, smokegrenade, hegrenade,
defusekits, and nightvision at spawn. C4 pickup can be disabled. A configurable sound is played when
when a player scores.

Servers using this mod: GameTracker.com sm_gunmenu_version

Installation:
Place compiled plugin (sm_gunmenu.smx) into the plugins folder.
Place the configuration file (gunmenu.ini) into the config folder.
Changes to gunmenu.ini are read at map/plugin load time.

Complimentary Plugins:
Ammo Replenishment Lite
Deathmatch Lite Respawn

Problems, Bug Reports, Feature Requests, and Compliments:
Please send me a private message at http://forums.alliedmods.net/private...=newpm&u=46596
Include a detailed description of how to reproduce the problem. Information about your server,
such as dedicate/listen, platform (win32/linux), game, and ip address may be useful.

I prefer to keep the plugin thread cleared so people don't have to wade through pages of fodder.
The community will be given a chance to address any bug reports that are posted in the plugin thread.
If you want a direct response from me, send a private message.

Compliments are always welcomed in the thread.

Background:
This plugin was inspired by these objectives:
  • Code 100% SourcePawn - Accessible to more programmers
  • No custom gamedata - If SourceMod works, then this plugin works
  • Stand alone modules - Only install what you need
Much gratitude towards Bailopan and crew for creating the original CSS:DM
plugin before there was SourceMod, and for developing SourceMod and SourcePawn.

Files:
  • cstrike/addons/sourcemod/plugins/sm_gunmenu.smx
  • cstrike/addons/sourcemod/configs/gunmenu.ini
  • cstrike/cfg/server.cfg

Commands:
sm_guns and sm_gunmenu - When enabled, presents player with menus to choose primary and secondary weapons

Gun Menu Configuration (Change in gunmenu.ini):
Configuration is specified as key values in the gunmenu.ini file.
There are four sections:
  • Settings - frag_sound (relative to sound), allow_c4 (yes/no), buy_zones (yes/no)
  • SpawnItems - health (0 no change), armor (0 no change), helmet (yes/no),
    flashbangs (yes/no), smokegrenade (yes/no), hegrenade (yes/no),
    defusekits (yes/no), nightvision (yes/no)
  • PrimaryMenu - classname and menu text ("weapon_g3sg1" "D3/AU-1")
  • SecondaryMenu - classname and menu text ("weapon_fiveseven" "ES Five Seven")

Server Configuration Variables (Change in server.cfg):
  • mp_fraglimit - Set this to score need to win map
  • mp_ignore_round_win_conditions - Set this to prevent round end

To-Do:
  • Knife steal
  • Free For All plugin
  • Other suggestions?

Changelog:
Code:

1.0 <-> 2011 - 11/13 LumiStance
Add code to close menu if player spectates
Add code to prevent spectators from opening menu
Add code to set bots to random guns
Consolidate Configuration Sections
Homogenize Error Messages
Remove Options Menu stubs
0.9 <-> 2011 - 10/17 LumiStance
Add code to strip Nades
Removed quantity option for Flashbangs
Cleanup entity removal code
Modify GivePrimary and GiveSecondary to retrieve weapon index
Add code to handle late load
0.8 <-> 2011 - 07/01 LumiStance
Add code to limit Defuser to CT
Add code to strip bomb on pickup (configurable)
Add code to prevent spectators from getting guns
Add SetFailState for entity member offsets
0.7 <-> 2011 - 06/28 LumiStance
Improve client_index validation in Event_HandleSpawn
Fix IsFakeClient() placement in Event_PlayerDeath
0.6 <-> 2011 - 06/24 LumiStance
Add code to remove buy zones
Add code to give/set Health, Nades, Night Vision, etc.
Add frag sound
Add code to nuke menus OnPluginEnd
0.5 <-> 2011 - 06/23 LumiStance
Public beta release
Develop Ammo Clip Refill on Kill
Move Refill and Restock into stand alone plugin
0.4 <-> 2011 - 03/25 LumiStance
Add code to only load config file and rebuild menus if timestamp changed
Moved 'None' weapon choice to end of menu
Add Reserve Ammo Replenishment and configuration
Made Configuration Section Titles case insensitive
0.3 <-> 2011 - 02/09 LumiStance
Fix range checking
0.2 <-> 2011 - 01/04 LumiStance
Remember Selection
Separate primary and secondary arrays
Implement Random and None Weapons
Range checking on selections, Announce
0.1 <-> 2011 - 01/03 LumiStance
Initial Menu


sjvcs 11-15-2011 13:51

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
Hello, your plugin is very good, but I tested my server and sometimes disappear and weapons not seen in the hands of the player is made ​​invisible.
You can fix this error?
friend

LumiStance 11-15-2011 22:59

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
Quote:

Originally Posted by sjvcs (Post 1597031)
...weapons not seen in the hands of the player is made ​​invisible.

It is a bug in the Source engine. I have seen this on some gun game servers. I need to know when this happens to develop a work around.

If anyone else sees this please PM with details including plugin list. I want to know when and what was going on in game.

sjvcs 11-19-2011 05:21

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
the problem is to be installed or zBlock and eslwire on the server, set shortly after the player is invisible weapon does not see the gun but if you can shoot.

but I've tested with the esl wire and zblock removed the server, and plugins work perfectly.

LumiStance 11-19-2011 18:06

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
Please reply to my private message. Please don't fill the thread with hard to understand replies. I will update the plugin when a solution is found.

tumtum 07-24-2013 11:52

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
If someone know this problem

Bind > !guns > Spam drop > server lagg.

How to fix this with this plugin? use it for DM.

Thanks

Remy Lebeau 11-02-2013 16:49

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
Does this plugin have a cvar to enable/disable? This would enable us to use it on a per map basis (with individual map configs)

LumiStance 11-02-2013 20:49

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
1 Attachment(s)
Quote:

Originally Posted by Remy Lebeau (Post 2056140)
Does this plugin have a cvar to enable/disable? This would enable us to use it on a per map basis (with individual map configs)

Here's an update, have not tested my self.
sm_gunmenu_enable

asherkin 11-13-2013 11:12

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
PHP Code:

m_iHealth FindSendPropOffs("CCSPlayer""m_iHealth");
    
m_ArmorValue FindSendPropOffs("CCSPlayer""m_ArmorValue");
    
m_bHasHelmet FindSendPropOffs("CCSPlayer""m_bHasHelmet");
    
m_bHasDefuser FindSendPropOffs("CCSPlayer""m_bHasDefuser");
    
m_bHasNightVision FindSendPropOffs("CCSPlayer""m_bHasNightVision"); 

You're bypassing SourceMod's safety checking an caching by doing this, just use GetEntProp.

You don't need to close handles in OnPluginEnd, SourceMod will do the cleanup.

PHP Code:

    // Work around A2S_RULES bug in linux orange box
    
SetConVarString(g_ConVar_VersionPLUGIN_VERSION); 

This hasn't been needed in quite a while.

LumiStance 11-13-2013 17:53

Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
 
Quote:

Originally Posted by asherkin (Post 2060356)
You're bypassing SourceMod's safety checking an caching by doing this, just use GetEntProp.

I appreciate your concern, FindSendPropOffs and SetEntData are still valid API functions.

Quote:

Originally Posted by asherkin (Post 2060356)
You don't need to close handles in OnPluginEnd, SourceMod will do the cleanup.

I'm aware of that.

Quote:

Originally Posted by asherkin (Post 2060356)
PHP Code:

    // Work around A2S_RULES bug in linux orange box
    
SetConVarString(g_ConVar_VersionPLUGIN_VERSION); 

This hasn't been needed in quite a while.

Did not see the memo. Do you have a link?


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

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