Raised This Month: $ Target: $400
 0% 

[SOLVED] Strange Entity Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
padilha007
Senior Member
Join Date: Jul 2008
Old 04-05-2011 , 13:25   [SOLVED] Strange Entity Problem
Reply With Quote #1

When I create the entity i get your id, when I check later I know is that entity but shows a different id. I used pev_iuser* to hold my informations but they are gone:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >
#include < engine >

public plugin_init()
{
    
register_plugin"*""*""*" );

    
register_clcmd("say /he",    "GiveNade");
    
    
RegisterHam(Ham_Spawn"grenade""Weaponbox_Spawned"1);
}

public 
GiveNadeid )
{
    static 
ID;
    
ID fm_give_itemid"weapon_hegrenade" );
    
    
client_print(0print_chat"Entity ID-1: %d"ID);
    
// i will have: 86
}

public 
Weaponbox_SpawnediEnt )
{
    if( 
pev_valid(iEnt) )
        
client_print(0print_chat"Entity ID-2: %d"iEnt);
    
    
// now i have: 87 Or 89
}

stock fm_give_itemidweapon[] )
{
    new 
wEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringweapon));
    if( !
pev_validwEnt ) )
        return -
1;
    
    
set_pevwEntpev_spawnflagsSF_NORESPAWN );
    
dllfuncDLLFunc_SpawnwEnt );
    
    if( !
ExecuteHamBHam_AddPlayerItemidwEnt ) )
    {
        if( 
pev_validwEnt ) )
            
set_pevwEntpev_flagspevwEntpev_flags ) | FL_KILLME );
    
        return -
1;
    }
    
    
ExecuteHamBHam_Item_AttachToPlayerwEntid );
    
    return 
wEnt;

__________________


Last edited by padilha007; 04-06-2011 at 12:27.
padilha007 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 19:46.


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