View Single Post
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 05-11-2020 , 19:15   Re: [Help] Drop weapon if user is under level 10
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
I agree with thEsp, instead of picking up and dropping, just block the pickup, it is super easy. This would apply to weaponbox and armoury_entity.

This is a very rough example that will block picking up weapons, you can add more logic/conditions to it. E.g. only if the weapon is on the ground, type of weapon, only particular players, only in certain scenarios, etc.
PHP Code:
#include <amxmodx>
#include <engine>

public plugin_init() 
{
    
register_touch"weaponbox" "player" "PlayerTouchWeaponbox" );
}

public 
PlayerTouchWeaponboxiEntity iPlayer )
{
    return 
PLUGIN_HANDLED;

Hm, can you give me 1 example ? the native is get_user_level(id)
elmedin is offline