Raised This Month: $ Target: $400
 0% 

Change of Knife on Knife Level


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gasior
Member
Join Date: Mar 2012
Old 03-04-2014 , 15:40   Change of Knife on Knife Level
Reply With Quote #1

Hi,

I want to change knife's model on Knife Level and what I've done is I added this

PHP Code:
    if(equal(lvlWeapon[leader],KNIFE) | get_user_flags(id) & ADMIN_LEVEL_H){
        
set_pev(id,pev_viewmodel2,"models/v_goldkinfe.mdl")
        
set_pev(id,pev_weaponmodel2,"models/p_goldkinfe.mdl")
    }

to this:

PHP Code:
// someone changes weapons
public event_curweapon(id)
{        
    new 
leader get_leader();
            
    if(!
ggActive || !is_user_connected(id)) return;

    
// keep star speed
    
if(star[id]) fm_set_user_maxspeed(id,fm_get_user_maxspeed(id)*1.5);
    
    
// monitor weapon activity
    
if(afkCheck[id] && is_user_alive(id)) afkCheck[id]++;

    
// have at least one bullet in AWP clip
    
if(get_pcvar_num(gg_awp_oneshot) && read_data(2) == CSW_AWP && read_data(3) > 1)
    {
        new 
wEnt get_weapon_ent(id,CSW_AWP);
        if(
pev_valid(wEnt)) cs_set_weapon_ammo(wEnt,1);

        
message_begin(MSG_ONE,gmsgCurWeapon,_,id);
        
write_byte(1); // current?
        
write_byte(CSW_AWP); // weapon
        
write_byte(1); // clip
        
message_end();
    }
    
    if(
equal(lvlWeapon[leader],KNIFE) | get_user_flags(id) & ADMIN_LEVEL_H){
        
set_pev(id,pev_viewmodel2,"models/v_goldkinfe.mdl")
        
set_pev(id,pev_weaponmodel2,"models/p_goldkinfe.mdl")
    }

and the whole sma is attached, could you help me with pointing the problem? Logs show nothing.
Attached Files
File Type: sma Get Plugin or Get Source (gungame_with_sql.sma - 726 views - 282.3 KB)
Gasior is offline
Old 03-07-2014, 14:46
Gasior
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Gasior
Member
Join Date: Mar 2012
Old 03-23-2014 , 13:45   Re: Change of Knife on Knife Level
Reply With Quote #2

Refresh.
Gasior is offline
Reply



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 05:11.


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