Hi , i made code , who will allow to buy a gravity, compiles without errors and warnings, but in server when i type /gv, the gravity dont reduces. Where is a mistake in my code ?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "TEST"
#define VERSION "1.0"
#define AUTHOR "TEST"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /gv","cmd_gravity")
}
public cmd_gravity(id)
{
if(!is_user_alive(id))
{
client_print(id,print_chat,"Dead players can't buy!")
}
else if(cs_get_user_money(id)<10000)
{
client_print(id,print_chat,"You dont have enough money!")
}
else
{
cs_set_user_money(id,cs_get_user_money(id) - 10000)
set_user_gravity(id,0.5)
}
return PLUGIN_HANDLED
}