Raised This Month: $ Target: $400
 0% 

Why this check doesnt work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
danonix
Senior Member
Join Date: Dec 2012
Old 05-07-2013 , 12:42   Re: Why this check doesnt work?
Reply With Quote #8

There is no more code, I've been even trying with get_user_frags(id), but still same problem, it didnt help.
Code:
public cbMyMenu(id, menu, item){
    static stats[8]
    new prefix[10];
    if(!is_user_alive(id)){
        ColorChat(id, GREEN, "[%s]^x01 Nie mozesz zmienic noza bedac niezywym", prefix);
        return PLUGIN_HANDLED
    }
    get_pcvar_string(g_cPrefix, prefix, charsmax(prefix)); 
    
    switch(item){
        case 0:{
            if(stats[0] < 50){
                client_print(id, print_chat, "You cant use this knife");
                return PLUGIN_HANDLED
            }
            else SetKnife(id, 0)
        }
    }
    return PLUGIN_CONTINUE
}

public SetKnife(id , Knife) {
    knife_model[id] = Knife
    
    new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo) 
    if ( Weapon != CSW_KNIFE )
        return PLUGIN_HANDLED
    
    new vModel[56],pModel[56]
    
    switch(Knife)
    {
        case 0: {
            format(vModel,55,"models/v_knife.mdl")
            format(pModel,55,"models/p_knife.mdl")
        }        
    } 
    
    entity_set_string(id, EV_SZ_viewmodel, vModel)
    entity_set_string(id, EV_SZ_weaponmodel, pModel)
    
    return PLUGIN_HANDLED;  
}
danonix is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode