|
BANNED
Join Date: Jul 2007
Location: (#504434)
|

09-05-2007
, 18:27
Re: Plugin Error [NEW PROBLEM]
|
#7
|
Alright, I fixed that stuff and it still doesn't work.
Could it be because i'm using a cs_set_user_money function and i'm running Condition-Zero? I know some CS plugins run with CZ though.
Anyway, heres the latest code(Tested and Failed)
PHP Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun>
#define PLUGIN "Shoes Mod" #define VERSION "1.0" #define AUTHOR "X-Script"
new ShoesMod new ShoesCost
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_menucmd(register_menuid("Shoes Choose"),(1<<0)|(1<<1)|(1<<2)|(1<<3),"SelectShoes") register_concmd("say /shoes", "selectshoes") register_concmd("say_team /shoes", "selectshoes") register_concmd("say /shoesinfo", "shoesinfo") register_concmd("say_team /shoesinfo", "shoesinfo") ShoesMod = register_cvar("amx_shoesmod", "1") ShoesCost = register_cvar("amx_shoesmod_cost", "10000") }
public client_putinserver(id) { set_task(11.0,"advertise",id) }
public advertise(id) { client_print(id, print_chat, "[ShoesMod] This server is running 'Shoes Mod' by X-Script VERSION 1.0!") client_print(id, print_chat, "[ShoesMod] Type /shoes too select a shoe, type /shoesinfo to display information!") return PLUGIN_HANDLED }
public selectshoes(id) { new menuBody[1024] format(menuBody,1023,"ShoeMod Main Menu ^n^n 1. Gravity Shoes [+Gravity / -Speed]^n 2. Speed Shoes [+Speed / -Gravity]^n 3. Health Shoes [+Health / -Armor]^n^n 0. Finished") show_menu(id,(1<<0)|(1<<1)|(1<<2)|(1<<3),menuBody,13,"Shoes Choose") }
public SelectShoes(id,key) { if ( get_pcvar_num(ShoesMod) == 0 ) { client_print(id, print_chat, "[ShoesMod] The function you tried to use is currently disabled.") return PLUGIN_HANDLED } switch(key) { case 0: { new playercash = cs_get_user_money(id) new maincost = get_pcvar_num(ShoesCost) if ( playercash < maincost ) { client_print(id, print_chat, "[ShoesMod] You do not have enough money to purchase a shoe.") return PLUGIN_CONTINUE } else { cs_set_user_money(id, playercash - maincost) set_user_gravity(id, 0.5) get_user_maxspeed(id) set_user_maxspeed(id, 210) new name[32] get_user_name(id,name,32) set_hudmessage(200,255,200, 0.03, 0.62, 2, 0.02, 2.0, 0.01, 0.1, 1) show_hudmessage(0, "%s has just bought Gravity Shoes, beware!",name) } } case 1: { new playercash = cs_get_user_money(id) new maincost = get_pcvar_num(ShoesCost) if ( playercash < maincost ) { client_print(id, print_chat, "[ShoesMod] You do not have enough money to purcahse a shoe.") return PLUGIN_CONTINUE } else { cs_set_user_money(id, playercash - maincost) get_user_maxspeed(id) set_user_maxspeed(id, 860) set_user_gravity(id, 1.5) new name[32] get_user_name(id,name,32) set_hudmessage(120,200,98, 0.03, 0.62, 2, 0.02, 2.0, 0.01, 0.1, 1) show_hudmessage(0, "%s has just bought Speed Shoes, beware!",name) } } case 2: { new playercash = cs_get_user_money(id) new maincost = get_pcvar_num(ShoesCost) if ( playercash < maincost ) { client_print(id, print_chat, "[ShoesMod] You do not have enough money to purchase a shoe.") return PLUGIN_CONTINUE } else { cs_set_user_money(id, playercash - maincost) set_user_health(id, 210) client_cmd(0, "spk ^"fvox/beep _comma beep _comma beep _comma administering_medical^"") set_user_armor(id, 20) new name[32] get_user_name(id,name,32) set_hudmessage(200,50,175, 0.03, 0.62, 2, 0.02, 2.0, 0.01, 0.1, 1) show_hudmessage(0, "%s has just bought Speed Shoes, beware!",name) } } case 3: { } } return PLUGIN_HANDLED }
|
|