Hey im making a script.
Here is what I have, I know something must be wrong but I can't figure out what i've done incorrectly, thanks.
Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <amxmisc>
#include <fakemeta_util>
#include <fun>
#include <xs>
#define PLUGIN "Buyxp"
#define VERSION "1.0"
#define AUTHOR "codyscafe7"
new xpcost[1] = {10000}
/* Initialization */
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say buyxp", "cmd_buyxp", 0, "- Buy Experience!")
register_cvar("buyxp", "30")
}
public cmd_buyxp(id)
{
new usermoney = cs_get_user_money(id)
// new username = get_user_name(id)
if (usermoney<xpcost){
client_print(id,print_center,"Your too poor for this. It's 10000!")
return PLUGIN_HANDLED
}
else if cs_set_user_money(id,usermoney-xpcost,1)
server_cmd ("pm_givexp ^"name^" @1", 30")
return PLUGIN_HANDLED
}