Raised This Month: $ Target: $400
 0% 

issue blocking buyzone


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-19-2011 , 19:08   Re: issue blocking buyzone
Reply With Quote #5

Quote:
Originally Posted by nikhilgupta345 View Post
Show the full code. It would also help if you told us which line was line 268.

Also, I don't think the errors you posted are from that part of the code.
Error code line was wrong... and has been found... 50 of my code uses get_pdata_cbase...

PHP Code:
#define OFFSET_PRIMARYWEAPON    116
#define OFFSET_C4_SLOT        372

public StripUserWeapons(id)
{
    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED;
        
    new 
iC4Ent get_pdata_cbase(idOFFSET_C4_SLOT);
    
    if( 
iC4Ent )
    {
        
set_pdata_cbase(idOFFSET_C4_SLOTFM_NULLENT);
    }

    
strip_user_weapons(id);
    
give_item(id"weapon_knife");
    
set_pdata_int(idOFFSET_PRIMARYWEAPON0);

    if( 
iC4Ent )
    {
        
entity_set_int(idEV_INT_weaponsentity_get_int(idEV_INT_weapons) | (1<<CSW_C4));
        
set_pdata_cbase(idOFFSET_C4_SLOTiC4Ent);
        
cs_set_user_bpammo(idCSW_C41);
        
cs_set_user_plant(id1);
    }
    
    if (
g_bomb_targ)
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
cs_set_user_defuse(id1);
        }
    }
    return 
PLUGIN_HANDLED;

Adding in is alive worked just fine.

Last edited by Doc-Holiday; 07-19-2011 at 19:18.
Doc-Holiday 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 01:05.


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