Raised This Month: $ Target: $400
 0% 

issue blocking buyzone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-19-2011 , 05:26   Re: issue blocking buyzone
Reply With Quote #1

The error is from the hamsandwich module but I don't see any hamsandwich code there.
__________________
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-19-2011 , 18:45   Re: issue blocking buyzone
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
The error is from the hamsandwich module but I don't see any hamsandwich code there.
Yeah thats what i said lol...

It works just fine in battlefield mod/vip mod/ and like 4 other plugins i have it in.

Quote:
Originally Posted by Tirant View Post
It's better to just make a map info entity and set buying to no team. Do this in plugin_precache()

Code:
#include <engine>

new ent = create_entity("info_map_parameters");
DispatchKeyValue(ent, "buying", "3");
DispatchKeyValue(ent, "bombradius", "1");
DispatchSpawn(ent);
Plugin precahce is only fired at plugin start correct?? which means it would always block? i need to only block if bool is true.

Last edited by Doc-Holiday; 07-19-2011 at 18:49.
Doc-Holiday is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-19-2011 , 18:54   Re: issue blocking buyzone
Reply With Quote #3

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.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-19-2011 , 19:08   Re: issue blocking buyzone
Reply With Quote #4

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


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