Raised This Month: $ Target: $400
 0% 

Error with a simple plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
matsi
Thinkosaur
Join Date: Sep 2006
Old 12-31-2009 , 13:29   Re: Error with a simple plugin
Reply With Quote #5

Quote:
Originally Posted by AppStore View Post
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)
    

What's with the first code?
matsi 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