PHP Code:
public OnPluginStart()
{
HookEvent( "item_pickup", EVENT_ItemPickUp );
}
public EVENT_ItemPickUp( Handle:event, const String:name[], bool:dontBroadcast )
{
new client = GetClientOfUserId( GetEventInt( event, "userid" ));
if ( client > 0 && IsClientInGame( client ))
{
new weapon = GetPlayerWeaponSlot( client, 0 );
decl String:WeaponCheck[64];
GetEntityClassname( weapon, WeaponCheck, sizeof( WeaponCheck ));
if ( StrContains( WeaponCheck, "awp", false ) != -1 )
{
PrintToChatAll( "This dude name %N just pick up AWP", client );
}
}
}
__________________