L 02/24/2011 - 12:45:34: Start of error session.
L 02/24/2011 - 12:45:34: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20110224.log")
L 02/24/2011 - 12:45:34: [CSTRIKE] Player out of range (0)
L 02/24/2011 - 12:45:34: [AMXX] Run time error 10 (plugin "cash_transfer.amxx") (native "cs_get_user_money") - debug not enabled!
L 02/24/2011 - 12:45:34: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 02/24/2011 - 12:58:44: Start of error session.
L 02/24/2011 - 12:58:44: Info (map "cs_estate") (file "addons/amxmodx/logs/error_20110224.log")
L 02/24/2011 - 12:58:44: [CSTRIKE] Player out of range (0)
L 02/24/2011 - 12:58:44: [AMXX] Run time error 10 (plugin "cash_transfer.amxx") (native "cs_get_user_money") - debug not enabled!
L 02/24/2011 - 12:58:44: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 02/24/2011 - 12:58:51: [CSTRIKE] Player out of range (0)
L 02/24/2011 - 12:58:51: [AMXX] Run time error 10 (plugin "cash_transfer.amxx") (native "cs_get_user_money") - debug not enabled!
L 02/24/2011 - 12:58:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
ale plugin działa..
jego sma
#include <amxmod>
#include <amxmisc>
#include <fun>
public plugin_init() {
register_plugin("Cash Transfer","1.0.8","AssKicR")
register_concmd("say","handle_say",ADMIN_USER)
register_concmd("say_team","handle_say",ADMIN_USER)
register_cvar("mt_cashsteal","1",0)
register_cvar("mt_cashdead","1",0)
register_cvar("mt_cashteam","1",0)
return PLUGIN_CONTINUE
}
public handle_say(id) {
//Show me the money
new said[31]
new cmd[10]
new target[9]
new amount[7]
new rest[5]
read_args(said, 30)
replace(said, 30, "^"", "")
parse(said, cmd,9, target,8, amount,6, rest,4)
new player = cmd_target(id,target,8)
new name[33]
new name2[33]
get_user_name(id,name,32)
get_user_name(player,name2,32)
new team[32]
new team2[32]
get_user_team(id,team,32)
get_user_team(player,team2,32)
if (equal(cmd, "/przelej", 9)) {
new money = get_user_money(id)
new money2 = get_user_money(player)
new cash = str_to_num(amount)
new bool:NoCantDo
NoCantDo=false
if (!is_user_alive(id)) {
if (get_cvar_num("mt_cashdead")==0) {
client_print(id,print_center,"Nie mozesz dac pieniedzy, poniewaz jestes martwy")
NoCantDo=true
}
}
if (!is_user_alive(player)) {
if (get_cvar_num("mt_cashdead")==0) {
client_print(id,print_center,"Nie mozesz dac pieniedzy martwemu graczowi")
NoCantDo=true
}
}
if (equal(name, name2)) {
client_print(id,print_center,"Nie mozesz dac sobie pieniedzy")
NoCantDo=true
}
if (!equal(team, team2)) {
if (get_cvar_num("mt_cashteam")==0) {
client_print(id,print_center,"Nie mozesz dac pieniedzy przeciwnej druzynie")
NoCantDo=true
}
}
if ((money2 + cash) > 16000) {
client_print(id,print_center,"%s nie moze miec wiecej pieniedzy")
NoCantDo=true
}
if (money < cash) {
client_print(id,print_center,"Nie masz tyle kasy")
NoCantDo=true
}
if (cash < 0) {
if (get_cvar_num("mt_cashsteal")==0) {
client_print(id,print_center,"Nie mozesz zabrac pieniedzy garczowi %s",name2)
NoCantDo=true
}
}
if (!NoCantDo) {
set_user_money(id, money - cash,1)
set_user_money(player, money2 + cash,1)
client_print(0,print_chat,"[TRANSFER] %s dal %i $ graczowi %s. Podziekuj mu za to !",name,cash,name2)
engclient_cmd(id,"napisz na say Dziekuje Ci %s",name)
}
}
return PLUGIN_CONTINUE
}
Użytkownik WarninG. edytował ten post 24.02.2011 13:17


Dodatki SourceMod



Temat jest zamknięty






