Raised This Month: $ Target: $400
 0% 

[ SOLVED ] Remove conflict between plugins?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-08-2015 , 10:05   [ SOLVED ] Remove conflict between plugins?
Reply With Quote #1

I have a little problem on my extra items when I set the gun down and caught her, she switches to another extra item, how to fix?

Code:
register_forward(FM_SetModel, "fw_SetModel");
Code:
public fw_SetModel(entity, model[]) {     if(!pev_valid(entity) || !equal(model, OLD_W_MDL)) return FMRES_IGNORED;         static szClassName[33]; pev(entity, pev_classname, szClassName, charsmax(szClassName));     if(!equal(szClassName, "weaponbox")) return FMRES_IGNORED;         static owner, wpn;     owner = pev(entity, pev_owner);     wpn = find_ent_by_owner(-1, "weapon_galil", entity);         if(g_has_gun[owner] && pev_valid(wpn))     {         g_has_gun[owner] = false;         set_pev(wpn, pev_impulse, 324584);         engfunc(EngFunc_SetModel, entity, W_GUN_MDL);                 return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; }

Code:
RegisterHam(Ham_Item_AddToPlayer, "weapon_galil", "fw_AddToPlayer");
Code:
public fw_AddToPlayer(weapon_entity, id) {     if(pev_valid(weapon_entity) && is_user_connected(id) && pev(weapon_entity, pev_impulse) == 324584)     {         g_has_gun[id] = true;         set_pev(weapon_entity, pev_impulse, 0);         return HAM_HANDLED;     }     return HAM_IGNORED; }

SOLVED: This
Code:
set_pev(wpn, pev_impulse, 324584);

Code:
if(pev_valid(weapon_entity) && is_user_connected(id) && pev(weapon_entity, pev_impulse) == 324584)

Code:
set_pev(wpn, pev_impulse,39480234);

Code:
if(pev_valid(weapon_entity) && is_user_connected(id) && pev(weapon_entity, pev_impulse) == 39480234)
__________________









Last edited by CrazY.; 11-08-2015 at 10:40.
CrazY. is offline
 


Thread Tools
Display Modes

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 17:54.


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