I wrote this plugin just now as my first ever to see if I could do it, but I got compiling errors but don't know how to read them/learn from them.
Does anyone know why this happened?
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "TESTING"
#define VERSION "1.0"
#define AUTHOR "kingcommentor"
new money
new gravity
new price
new enabled
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /test","testing")
money = cs_get_user_money(id)
gravity = register_cvar("amx_gravity", "0.25")
price = register_cvar("amx_grav_price", "1000")
enabled = register_cvar("amx_grav_enabled", "1")
}
public testing(id)
{
if (get_pcvar_num(enabled) == 1)
{
if (Money < 1000)
{
client_print(id,print_chat,"You don't have enough money!")
}
else
{
client_print(id, print_chat, "TESTING EXECUTED")
set_user_gravity(id,(gravity))
cs_set_user_money(id, money-price)
}
}
}
Also how can I make the message appear in the middle of the players screen instead of down where teh chat is .. and also how can I make it appear as a HUD ?