I'm writing a code so that a user can make himself a "Haxor", where that costs 16,000 bucks!
Here's the code so far:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "Test Mod"
#define VERSION "1.0"
#define AUTHOR "iHaxor.Stan"
new haxorprice
new haxorhp
new haxorarmor
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /haxor","cmd_haxor");
haxorprice = register_cvar("gm_price","16000")
haxorhp = register_cvar("gm_health","500")
haxorarmor = register_cvar("gm_armor","300")
}
public cmd_haxor(id)
{
if(cs_get_user_money(id) < get_pcvar_num(haxorprice))
{
client_print(id,print_chat,"Oops! You don't have enough cash to become a Haxor!")
client_print(id,print_console,"Oops! You don't have enough cash to become a Haxor!")
return PLUGIN_CONTINUE
}
else
{
set_user_health(id,get_pcvar_num(haxorhp))
set_user_armor(id,get_pcvar_num(haxorarmor))
client_print(id,print_chat,"Gratz! Your now a Haxor!")
client_print(id,print_console,"Gratz! Your now a Haxor!")
}
return PLUGIN_CONTINUE
}
Firstly, I've never made a code before (this is my first post on the forums), so I need to know if that it setup correctly. I was searching old topics and gathered the info I needed to make that.
But now I need to know how to do the following things when the user is a "haxor"
-Make him 3 times faster.
-Make his gravity at 200.
-Make him immune to headshots.
-Make him only have a knife. If he picks up another gun, he automatically drops it. And he cant buy weapons.
-Make him glow red or blue, depending on the team he's on (ct or t).
So can somebody please help me with that stuff? Whatever you can help with would be fantastic!