View Single Post
Noizza
Senior Member
Join Date: Apr 2004
Location: Vienna (PROUD)
Old 06-20-2005 , 21:21  
Reply With Quote #10

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
__________________
Quote:
Originally Posted by Johnny got his gun
Read the plugin posting rules. They apply to everyone, including you.
kk...
#include <noizza>
lol

try my Server!
193.53.80.122:27016 Super-Fun Server [SHmod+DM]
Noizza is offline
Send a message via ICQ to Noizza