Raised This Month: $32 Target: $400
 8% 

function give item() not working because another plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HITLER
Member
Join Date: Jul 2018
Location: www
Old 12-02-2019 , 20:57   function give item() not working because another plugin
Reply With Quote #1

i have 2 plugins
in first plugin it should give T team smokegernade but because a part of code in second plugin the somkegernade don't added to player.

here is the 2 codes.

first plugin
PHP Code:
give_item(id"weapon_smokegrenade"); 
second plugin
PHP Code:
RegisterHam(Ham_AddPlayerItem"player""CBasePlayer_AddPlayerItem");

public 
CBasePlayer_AddPlayerItem(idiWeapon
{
    if(
get_user_human(id))
        return 
HAM_IGNORED;
    
    if(
ExecuteHam(Ham_Item_GetWeaponPtriWeapon) != iWeapon || cs_get_weapon_id(iWeapon) == CSW_KNIFE)
        return 
HAM_IGNORED;
    
set_pev(idpev_viewmodel2g_zombie_hands_models[iClass[id]]);
    
set_pev(idpev_weaponmodel2"");
    
entity_set_int(iWeaponEV_INT_flagsentity_get_int(iWeaponEV_INT_flags) | FL_KILLME);
    
SetHamReturnInteger(0);
    return 
HAM_SUPERCEDE;

if i delete CBasePlayer_AddPlayerItem in second plugin everything works well.
i tried to edit the second code it works but set_pev(id, pev_viewmodel2, g_zombie_hands_models[iClass[id]]); is not working
__________________

Last edited by HITLER; 12-02-2019 at 21:37.
HITLER is offline
Send a message via Skype™ to HITLER
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 14:30.


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