Raised This Month: $ Target: $400
 0% 

Give Money


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
iNspiratioN
Member
Join Date: Feb 2009
Location: Lithuania
Old 03-06-2009 , 09:14   Re: Give Money
Reply With Quote #6

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
#define PLUGIN "Admin Rich"
#define VERSION "1.0"
#define AUTHOR "emilioneri"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
register_concmd("amx_rich""cmd_rich"ADMIN_SLAY"<give user 16000$>")
    return 
PLUGIN_HANDLED 
}
 
public 
cmd_rich(idlevelcid)
{
     if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
 
     
new Arg1[24]
     new 
Arg2[4]
 
     
read_argv(1Arg123)
     
read_argv(2Arg23)
 
     new 
Money str_to_num(Arg2)
 
     if (
Arg1[0] == '@')
     {
          new 
Team 0
          
if (equali(Arg1[1], "CT"))
          {
               
Team 2
          
} else if (equali(Arg1[1], "T")) {
               
Team 1
          
}
          new 
players[32], num
          get_players
(playersnum)
          new 
i
          
for (i=0i<numi++)
          {
               if (!
Team)
               {
                    
cs_set_user_money(players[i], Money)
               } else {
                    if (
get_user_team(players[i]) == Team)
                    {
                         
cs_set_user_money(players[i], Money)
                    }
               }
          }
     } else {
          new 
player cmd_target(idArg11)
          if (!
player)
          {
               
console_print(id"Didn't found %s"Arg1)
               return 
PLUGIN_HANDLED
          
} else {
               
cs_set_user_money(playerMoney)
          }
     }
 
     return 
PLUGIN_HANDLED

EDIT: Dang every1 helped him so fast!

Last edited by iNspiratioN; 03-06-2009 at 09:17.
iNspiratioN 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 17:03.


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