[CS:S] Weapon Limiter by SteamID (v0.45)

Hi everyone,



This plugin has been made by ZAP Killer a few months ago (during the year 2011, I don't remember when exactly) for .:€S C 90 Team:. Counter-Strike: Source main server (more info at www.esc90.fr).

Now the author, mainly because of a lack of time, has stopped development for this plugin and as a result, has asked me to post it here in order to get help on improving it.

I'd like to say that the author himself, as being part of the team, allowed me and asked me to post the plugin here.

If the fact that the author did not post the plugin himself disturbs anyone here, please let me know.

But I think it is part of the aim of this forum to share open source files and ask for feedback.



Its purpose is to prevent high skilled players from using weapons that server admins can define: ak47, awp, m4a1, etc...

Both players and weapons can be managed by admins using two simple files that they can edit: zk_wlbsid_players.txt and zk_wlbsid_weapons.txt.

When a defined player uses a weapon that has been added to the server list, he is slayed, and gets a message in chat saying he has to use another weapon.



Installation:



Place zk_wlbsid.smx in your cstrike/addons/sourcemod/plugins directory

Place zk_wlbsid.sp in your cstrike/addons/sourcemod/scripting directory

Create and place a file called zk_wlbsid_players.txt into your cstrike folder

Create and place a file called zk_wlbsid_weapons.txt into your cstrike folder

This plugin requires SDK Tools.



Usage:



1) Add SteamIDs of players you want to restrict in the zk_wlbsid_players.txt file.

Only one SteamID by line.

The file does not support comments.

No blank line at the end or at the beginning.



2) Add weapons you want to restrict in the zk_wlbsid_weapons.txt file.

Same comment: only weapons here, and only one by line.



I attached example files so you can have a look on how you should edit files.



3) By default, plugin is enabled.

To disable it, you can use zk_wlbsid_enabled cvar (1 to enable it, 0 to disable).

You can also use maps cfgs if you want to have it enabled only on specific maps.



Issues:



- Plugin works fine, however, it creates error logs that we would like to get rid of.

Here is an example of the error:


Quote:









L 11/12/2011 - 06:26:35: SourceMod error session started

L 11/12/2011 - 06:26:35: Info (map "de_dust2") (file "errors_20111112.log")

L 11/12/2011 - 06:26:35: [SM] Native "KillTimer" reported: Invalid timer handle 1aa01a3 (error 1)

L 11/12/2011 - 06:26:35: [SM] Displaying call stack trace for plugin "zk_wlbsid.smx":

L 11/12/2011 - 06:26:35: [SM] [0] Line 81, /home/groups/sourcemod/upload_tmp/phpEMrqco.sp::ZKWLBSID_ConVarChange()

L 11/12/2011 - 06:26:36: Error log file session closed.




- Then, instead of slaying players, we would like it to restrict weapons.



- Finally, we would like it to be more user friendly, i.e.:



1) having an integrated admin menu for sourcemod

2) admins should be able to add a player or a weapon using the menu

3) we can also imagine the information being stored in a database instead of two text files...



Any feedback, help, or comment will be welcome.



Regards,



St00ne















Attached Files














File Type: sp


Get Plugin or
Get Source (zk_wlbsid.sp - 8.4 KB)


File Type: txt


zk_wlbsid_players_EXAMPLE.txt (58 Bytes)


File Type: txt


zk_wlbsid_weapons_EXAMPLE.txt (114 Bytes)


File Type: smx


zk_wlbsid.smx (5.1 KB)








Orignal From: [CS:S] Weapon Limiter by SteamID (v0.45)

No comments

Not a single link is allowed to submit in comment :o