hmmm... i did it like that:
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
new g_PlayerHasJump[33]
public plugin_init() {
register_plugin("Longjump","1.0","WaZZeR")
register_clcmd("buy_jump","GiveLongJump",0,"Buy Long Jump")
register_cvar("amx_longjump_cost","1500")
}
public plugin_precache()
{
precache_model("models/w_longjump.mdl") //longjump
precache_model("models/w_longjumpt.mdl") //---"---
}
public client_connect(id)
{
g_PlayerHasJump[id] = 0
return PLUGIN_HANDLED
}
public client_disconnect(id)
{
g_PlayerHasJump[id] = 0
return PLUGIN_HANDLED
}
public GiveLongJump(id)
{
if(!is_user_alive(id))
{
client_print(id,print_chat,"[AMX] Dead men can't jump so neither do you.")
return PLUGIN_HANDLED
}
new money,cost
money = cs_get_user_money(id)
cost = get_cvar_num("amx_longjump_cost")
if( money < cost)
{
client_print(id,print_chat,"[AMX] You do not have enough money. Need %d",cost)
}
new name[35]
cs_get_user_name(id,name,34)
client_print(0,print_chat,"[AMX] %s has bought Long Jump",name)
g_PlayerHasJump[id] = 1
give_item(id,"item_longjump")
cs_set_user_money(id,(money - cost),1)
return PLUGIN_HANDLED
doesn work...
line 50: undefinied something cs_get_user_name
__________________