Raised This Month: $ Target: $400
 0% 

FM_SetModel, pev_impulse


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nato
Junior Member
Join Date: Jul 2011
Old 01-26-2014 , 11:03   FM_SetModel, pev_impulse
Reply With Quote #1

Hey. When give entity weapons set pev_impulse 500.
In FM_Setmodel do check
client_print (id, print_chat, "SetModel impulse ==% d", pev (entity, pev_impulse));
if (pev (entity, pev_impulse) == 500)

but it did not pass because the pev_impulse == 0
why pev_impulse == 0 ?

PHP Code:
stock fm_give_item(id, const item[]) 
{
    static 
ent;
    
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem));
    if (!
pev_valid(ent)) return;

        
set_pev(entpev_impulse500);
    
    static 
Float:originF[3];
    
pev(idpev_originoriginF);
    
set_pev(entpev_originoriginF);
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN);
    
dllfunc(DLLFunc_Spawnent);
    
    static 
save;
    
save pev(entpev_solid);
    
dllfunc(DLLFunc_Touchentid);
    if (
pev(entpev_solid) != save)
        return;
    
    
engfunc(EngFunc_RemoveEntityent);
}

register_forward(FM_SetModel"fwd_SetModel"0);

public 
fwd_SetModel(entity, const model[]) 
{        
    static 
id;
    
id pev(entitypev_owner);
        
    
client_print(idprint_chat"SetModel impulse == %d"pev(entitypev_impulse));    
    
    if (
pev(entitypev_impulse) == 500)
    {
        
//code
        
return FMRES_SUPERCEDE;
    }
        
    return 
FMRES_IGNORED;

nato 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 10:12.


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