Hi,
I want restrict
PHP Code:
weapon_sg550
weapon_g3sg1
but restmenu.amxx crashes server
I also write this small plugin, but it crashes server too
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_plugin( "PLUGIN", "VERSION", "AUTHOR" )
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
}
public Event_CurWeapon(id)
{
if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE
new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
if( (weapon == CSW_G3SG1) || (weapon == CSW_SG550) )
{
engclient_cmd(id, "drop", "weapon_sg550")
engclient_cmd(id, "drop", "weapon_g3sg1")
}
return PLUGIN_CONTINUE
}
For restricting shield I use noshield.amxx plugin by ConnorMcLeod
http://forums.alliedmods.net/showthread.php?p=1308465
It works perfectly and server works stable with it
Can anybody tell me how rewrite noshield.sma for my case ?