Im trying to do if the player dosent have Enough money Its print somting
like
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new Cost
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("say /Reviveme","revive")
Cost = register_cvar("revive_cost","16000")
}
public revive(id)
{
if(!is_user_alive(id) )
{
new money = cs_get_user_money(id)
new cost = get_pcvar_num(Cost);
(money >= cost)
cs_user_spawn(id)
cs_set_user_money(id, money -cost)
}
else
{
client_print(id, print_chat,"You havent Enough money To buy this item")
}
Is it Right?