Raised This Month: $ Target: $400
 0% 

Force Drop Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-19-2013 , 08:21   Re: Force Drop Weapon
Reply With Quote #1

Weaponname is missing, thought you know it.

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init(){
    
register_concmd("amx_dropweapon""cmd_dropweapon"ADMIN_BAN"<name or #userid>")
}

public 
cmd_dropweapon(idlevelcid){
    if (!
cmd_access(idlevelcid1)) return PLUGIN_HANDLED

    
new szArg[32]
    
read_argv(1szArg31)

    new 
iPlayer cmd_target(idszArgCMDTARGET_OBEY_IMMUNITY CMDTARGET_NO_BOTS CMDTARGET_ALLOW_SELF)
    if (
iPlayerdrop_user_weapon(iPlayer)

    return 
PLUGIN_HANDLED
}

stock drop_user_weapon(id){
    new 
szWeaponName[32], iWeapon get_user_weapon(id)
    
get_weaponname(iWeaponszWeaponName31)
    
engclient_cmd(id"drop"szWeaponName)

__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 04-19-2013 at 08:22.
Leon M. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode