Raised This Month: $ Target: $400
 0% 

Solved cs_get_weapon_burst Error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hellmonja
Senior Member
Join Date: Oct 2015
Old 05-17-2016 , 04:09   Re: [HELP] cs_get_weapon_burst Error
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
cs_get_weapon_burst expects you a weapon entity index not player.
You mean like "CSW_VP70"? but that's what was originally in there and it also got an error.
But okay, I'll test it again first. Might just be a slight case of the stupid on my part.
Be updating you in a few...

UPDATE:
======
No go replacing it with "CSW_VP70". I even tried putting "CSWID" but still the same error. I'll put the whole "Event_CurWeapon" code so you can see what I mean.

PHP Code:
public Event_CurWeapon(id)
{
    if(!
is_user_alive(id))
        return
        
    static 
CSWIDCSWID read_data(2)
    
    if((
CSWID == CSW_VP70 && g_Old_Weapon[id] != CSW_VP70) && Get_BitVar(g_Had_Weaponid))
    {
        
set_pev(idpev_viewmodel2V_MODEL)
        
set_pev(idpev_weaponmodel2"")
        
        
set_weapon_anim(idDRAW_ANIM)
        
Draw_NewWeapon(idCSWID)
        
set_user_maxspeed(idget_user_maxspeed(id)-WALKSPEED);
    } else if((
CSWID == CSW_VP70 && g_Old_Weapon[id] == CSW_VP70) && Get_BitVar(g_Had_Weaponid)) {
        static 
EntEnt fm_get_user_weapon_entity(idCSW_VP70)
        if(!
pev_valid(Ent))
        {
            
g_Old_Weapon[id] = get_user_weapon(id)
            return
        }
        
        new 
Float:rof
        
if(Get_BitVar(g_Had_Weapon,id))
        {
            if(
cs_get_weapon_burst(CSWID)) rof BURSTROF
            
else rof RATEOFIRE
        
}
        
set_pdata_float(Ent46get_pdata_float(Ent464) * rof4)
    } else if(
CSWID != CSW_VP70 && g_Old_Weapon[id] == CSW_VP70Draw_NewWeapon(idCSWID)
    
    
g_Old_Weapon[id] = get_user_weapon(id)


Last edited by hellmonja; 05-17-2016 at 04:37.
hellmonja 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 18:42.


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