Raised This Month: $ Target: $400
 0% 

Error with a simple plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AppStore
BANNED
Join Date: Dec 2009
Location: Saladillo
Old 12-31-2009 , 08:35   Re: Error with a simple plugin
Reply With Quote #4

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

#define PLUGIN "He-slap"
#define VERSION "1.0"
#define AUTHOR "r4nDoMz"


public plugin_init() {
    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("heslap_dmg""75")
    
register_concmd("amx_he","henade"ADMIN_CVAR)
    
}

public 
henade(idlevelcid)
{
    if (!
cmd_access(idlevelcid2) )
        return 
PLUGIN_HANDLED
    
    
new arg[33]
    
read_argv(1arg32)
    new 
player cmd_target(idarg7)
    
    if(!
player)
        return 
PLUGIN_HANDLED
    
    give_item
(id,"weapon_hegrenade")
    
user_slap(idget_cvar_num("heslap_dmg"), 0)
    
    return 
PLUGIN_CONTINUE
    

or..

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

public plugin_init() {
    
    
register_plugin("He-slap""1.0""r4nDoMz")
    
register_cvar("heslap_dmg""75")
    
register_clcmd("say /he","henade")
    
}

public 
henade(id)
{
    
give_item(id,"weapon_hegrenade")
    
user_slap(idget_cvar_num("heslap_dmg"), 0)
    


Last edited by AppStore; 12-31-2009 at 08:38.
AppStore is offline
 



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 04:08.


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