Raised This Month: $66 Target: $400
 16% 

TS Weapon restrictions


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   SniperBeamer (61)
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-14-2004 , 17:21   TS Weapon restrictions
Reply With Quote #1

This plugin is used to restrict access to certain weapons in TS, you can restric access to any weapon. You can also restrict diffrent firing modes on weapons it works by checking once a weapon is equipped check if that weapon is restricted by a admin, if it is. The weapon is removed from the user and deleted from the word. The user is also given a warring
It will also log any offenders while notifying the other players

Usage:
Edit the addons/amxmodx/configs/ts_restriction.cfg
Add the weapons you want to restrict here

Or use the amx_restrict command:
amx_restrict 1 2 will restrict the glock 18 from being used in full auto
amx_restrict 1 1 will restrict the glock 18
amx_restrict 1 0 will remove the restriction

Credits:
Ops in #AMXmodx @ Quakenet for alot of help ( + AssKicker & CheesyPeteza )

This plugin requires the ENGINE module

Changelog
  • 1.2.2 ( 19.11.2004 )
    - Fixed: Exploit preventing droping of weapon
    - Fixed: Plugin should handle multiple knifes better
    - Fixed: logs not being writen correctly or not at all
    - Added: You will no longer be spammed with messages if you have muliple guns that are restriced
    - Changed: remove_weapon() has been optimized some more( it now gets ents by owner first)
    - Changed: The welcome message is not shown if there is no weapoons restricted or firemods restriced
Todo:
  • Add menus
If you cant make the plugin work read this
Attached Files
File Type: sma Get Plugin or Get Source (ts_weaponrestric.sma - 4183 views - 12.2 KB)
File Type: zip ts_restriction.zip (643 Bytes, 2466 views)
__________________
Github archive for plugins, the repos for the other c++ projects are there to.

Last edited by EKS; 06-26-2006 at 11:18.
EKS is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-15-2004 , 13:32  
Reply With Quote #2

Update

1.0.0 ( 15.08.2004 )
Quote:
- Added: Several minor changes to improve preformace
- Added: Optional logging system
- Added: Grenade can now be restricted ( Note this does not stop it from being spawned as a powerup, but stops user from using it )
- Fixed: The order in g_WeaponName / g_WeaponModel witch could create problems
- Fixed: Removed the worst of the typos ( Thx to kz`[ROD]-Rayne)
- Changed: amx_restrict should be able to stop all attemts to restrict guns that dont exist
EKS is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-21-2004 , 19:54  
Reply With Quote #3

Changelog
  • 1.1.0 ( 21.08.2004 )
    - Added: Support to to restric full auto in diffrent weapons. (Example on how to restrict the G18: amx_restrict 1 2 )
EKS is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 08-21-2004 , 20:59  
Reply With Quote #4

You should add support for spawning TS weapons.

Code:
//This will create a weapon and force the person the command is force_used on to force_use it.
public CmdWeaponGive(id) { 
	new buffer[33]
	read_argv(1,buffer,32)
	new target = cmd_target(id,buffer,0)
	new SendThis[33]
	new ent = create_entity("ts_groundweapon")
	read_argv(2,SendThis,32)
	DispatchKeyValue(ent, "tsweaponid", SendThis)
	DispatchKeyValue(ent, "wduration", "1")
	read_argv(3,SendThis,32)
	DispatchKeyValue(ent, "wextraclip", SendThis)
	read_argv(4,SendThis,32)
	DispatchKeyValue(ent, "spawnflags", SendThis)
	DispatchSpawn(ent)
	force_use(target,ent)
	return PLUGIN_HANDLED 
} 

//This will create a weapon at the force_users feet.
public CmdWeaponCreate(id) { 
  
	new buffer[33]
	read_argv(1,buffer,32)
	new SendThis[33]
	new ent = create_entity("ts_groundweapon")
	read_argv(2,SendThis,32)
	DispatchKeyValue(ent, "tsweaponid", SendThis)
	DispatchKeyValue(ent, "wduration", "1")
	read_argv(3,SendThis,32)
	DispatchKeyValue(ent, "wextraclip", SendThis)
	read_argv(4,SendThis,32)
	DispatchKeyValue(ent, "spawnflags", SendThis)
	DispatchSpawn(ent)
	new Float:fNewOrigin[3]
	entity_get_vector(id, EV_VEC_origin, fNewOrigin)
	entity_set_origin(ent, fNewOrigin)

	return PLUGIN_HANDLED  
}
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-21-2004 , 21:16  
Reply With Quote #5

not to this plugin.

But if the new TS module does not have a native for this, and MIGHT make a plugin for this. All depends on how much my current TS plugins are used and what happens in rl
EKS is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 08-21-2004 , 21:23  
Reply With Quote #6

Quote:
Originally Posted by EKS
not to this plugin.

But if the new TS module does not have a native for this, and MIGHT make a plugin for this. All depends on how much my current TS plugins are used and what happens in rl
Well hey, that works too. But thats my code bub. Ok, part of its asskickers, part of its LGBR. So, whatever.

Just a suggestion ^^
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-24-2004 , 21:28  
Reply With Quote #7

Updated
Quote:
Changelog
1.1.1 ( 25.08.2004 )
- Fixed: Plugin no longer uses hardcoded path
- Fixed: Log not being writen if the server changed map/quit
EKS is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 09-12-2004 , 17:51  
Reply With Quote #8

Quote:
Changelog
1.2.0 ( 12.09.2004 )
- Added: plugin_modules() to stop plugin if required modules are not loaded ( Requires amxx .20+ )
- Added: say /restriclist to show what guns/rifles are restriced
- Added: Option to show what weapons are resticed once a player joins the server
- Fixed: Message that kungfu was restriced
- Fixed: Error where config file would not get loaded becuse array was to small to hold full path( With .20 + This would happen )
- Fixed: Fixed emty lines being writen in the logs
EKS is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 09-22-2004 , 14:03  
Reply With Quote #9

Quote:
Changelog
1.2.1 ( 12.09.2004 )
- Changed: The way the plugin handles strings. ( Should compile on "all" compilers)
- Changed: How the plugin finds the gun Ent ( Should be faster this way )
EKS is offline
Lenin
New Member
Join Date: Sep 2004
Location: California
Old 09-22-2004 , 18:48  
Reply With Quote #10

Well done! Thanks for the update! Now I can use it on .16!
__________________

TS Server: 216.73.106.99
Lenin is offline
Send a message via AIM to Lenin
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:28.


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