Nice plugin, but I'd like this plugin a little bit different, because I don't like that there are huds... I like, that someone looks at this topic
http://forums.alliedmods.net/showthread.php?t=15379 and changes this script a little bit, because it's older than 1 year and it doesn't compiles right on amxx 1.75:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new amount[] = cs_get_user_money(id)
new balance[] = amount - str_to_num(arg2)
new target_balance[] = amount + str_to_num(arg2)
public plugin_init() {
register_plugin("Money Giver", "1.0" , "VanillA Ice")
register_clcmd("say /give","money_give",0,"<name><money> - give money to a player")
set_task(200.0, "Notify", "0", "b")
}
public money_give(id) {
new arg1[33],arg2[33],name[33],aname[33]
read_argv(2,arg1,31)
read_argv(3,arg2,31)
new target = cmd_target(id,arg1,1)
get_user_name(target,name,32)
get_user_name(id,aname,32)
if (amount <= str_to_num(arg2) )
{
client_print(id, print_chat, "[AMXX] You cant give more than you have or else you will go bankrupt! Maybe you should not be THAT generous, huh?" )
return PLUGIN_HANDLED
}
//***************
//-------------------------------------
//****************
if (amount >= arg2)
{
cs_set_user_money(id, balance, 1)
cs_set_user_money(target, target_balance, 1)
client_print(0, print_chat, "[AMXX] %s gave %s %d dollars, how kind of him!",aname,name,arg2)
client_print(id, print_chat, "[AMXX] You have %s %d dollars!", name, arg2)
client_print(target, print_chat, "[AMXX] %s was kind enough to give you %d dollars! Go give him a big hug!",aname, arg2)
}
return PLUGIN_HANDLED
}
public Notify(id){
client_print(0, print_chat, "[AMXX] Be generous today and makes someone's day, say /give <amount> to give money to a person!")
}
__________________