Raised This Month: $ Target: $400
 0% 

Money Script Command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-22-2009 , 03:48   Re: Money Script Command
Reply With Quote #9

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
#define PLUGIN "Give me money PLSPLS"
#define AUTHOR "Xellath"
#define VERSION "0.1"
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
 
    
register_concmd("give_money""GiveMoney"ADMIN_KICK"<name|#userid> <value>");
}
 
public 
GiveMoney(id)
{
    if(!(
get_user_flags(id) & ADMIN_KICK))
        return 
PLUGIN_HANDLED;
 
    new 
arg[32], arg2[32];
    
read_argv(1arg32);
    
read_argv(2arg232);
 
    new 
Target cmd_target(idarg0);
    new 
Value str_to_num(arg2);
 
    if(!
Target)
    {
        
console_print(id"Target not found!");
        return 
PLUGIN_HANDLED;
    } 
 
    new 
money cs_get_user_money(Target);
    new 
name[32];
 
    if(
Target)
    {
        
cs_set_user_money(Targetmoney Value);
 
        
get_user_name(idname31);
        
client_print(Targetprint_chat"[AMXX] ADMIN %s added %s to your total amount of money."nameValue);
    }
 
    return 
PLUGIN_HANDLED;

Next time, search.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!

Last edited by Xellath; 06-22-2009 at 03:50.
Xellath 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 15:34.


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