Raised This Month: $ Target: $400
 0% 

I need some help :D


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LeaF-666
Junior Member
Join Date: Dec 2009
Location: Bucharest, RO
Old 12-22-2009 , 17:44   I need some help :D
Reply With Quote #1

Hello there!
I have a problem with my plugin...

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

#define PLUGIN    "amx_addfrags"
#define AUTHOR    "LeaF-666"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_addfrags""fragsadd"ADMIN_BAN"<target> <frags>" )
}

public 
fragsadd(idlevelcid)
{
    if(!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new Arg1[24]
    new 
Arg2[4]
    
    
read_argv(1Arg123)
    
read_argv(2Arg23)
    
    new 
frags str_to_num(Arg2)
    new 
player cmd_target(idArg111)
    
    if (!
player){
        
console_print(id"Player %s cannot be found!"Arg1)
        return 
PLUGIN_HANDLED
    

    
set_user_frags(playerget_user_frags(player) +frags)
    
    return 
PLUGIN_HANDLED

1. The frags are given only when player dies or round is over etcetera.
I want to be given immediately.
2. If i give to player 100 frags, he take only 99.
LeaF-666 is offline
Send a message via Yahoo to LeaF-666
 



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