Quote:
Originally Posted by ougogo
It doesn't work with new version of orangebox and CSS, can you update this script?
Cordially,
Hugo
|
This work on latest Cs:s.
You could check your SM logs have you any errors.
Or tell us what other mods you have on server
*edit
This use extension SDKHooks
PHP Code:
/*
AutoSilencer by meng
Automatically puts a silencer on the M4A1.
*/
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
public OnPluginStart()
{
for(new i = 1; i < MaxClients; i++)
{
if(IsClientInGame(i))
{
OnClientPutInServer(i);
}
}
}
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_WeaponEquip, Hook_OnWeaponEquip);
}
public Action:Hook_OnWeaponEquip(client, weapon)
{
decl String:item[20]; item[0] = '\0';
GetEdictClassname(weapon, item, sizeof(item));
if (StrEqual(item, "weapon_m4a1")){
SetEntProp(weapon, Prop_Send, "m_bSilencerOn", 1);
SetEntProp(weapon, Prop_Send, "m_weaponMode", 1);
}
}
*edit
I change SDKHook type
SDKHook_WeaponSwitch to
SDKHook_WeaponEquip
*update
Thanks
zylius and
asherk #
19