Hello,
This is my plugin:
PHP Code:
#pragma semicolon 1
#include <sdkhooks>
#include <sdktools>
public OnEntityCreated( entity, const String:classname[] )
{
if( StrEqual( classname, "weapon_p90" ) || StrEqual( classname, "weapon_g3sg1" ) || StrEqual( classname, "weapon_scar20" ) )
{
SDKHook( entity, SDKHook_Spawn, Hook_OnEntitySpawn );
}
}
public Action:Hook_OnEntitySpawn( entity )
{
if( !IsValidEntity( entity ) )
return Plugin_Continue;
AcceptEntityInput( entity, "Kill" );
return Plugin_Handled;
}
Unfortunately, the server crashes. Please help me.