I'm not using strip_user_weapons, I just have a plugin that makes players able to drop the knife. Will it be fine to check if player has no weapon on CurWeapon event, then do that set_pdata_int thing?
Edit: Like this?
PHP Code:
#include < amxmodx >
#include < engine >
#include < hamsandwich >
new g_iCurrentWeapon[ 33 ]
public plugin_init( )
{
register_event( "CurWeapon", "event_CurWeapon", "be", "1=0", "2=0", "3=0" )
RegisterHam(Ham_Spawn, "player", "player_spawn", 1);
}
public plugin_precache( )
{
precache_model( p_model )
}
public player_spawn(id)
event_CurWeapon(id)
public event_CurWeapon( id )
{
if( !is_user_alive( id ) )
return
g_iCurrentWeapon[ id ] = read_data( 2 )
if( g_iCurrentWeapon[ id ] )
return
set_pdata_int(id, 116, 0, 5)
}
I'm calling the event on respawn cause when the player respawns, he holds no weapon.