Raised This Month: $ Target: $400
 0% 

Help with pev_groupinfo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 12-27-2014 , 20:58   Re: Help with pev_groupinfo
Reply With Quote #9

I try with the sandbags of zombie plague but dont work well, the humans can transfer but the zombies too and the owner of sandbags cant transfer them, why dont work well?

code:

PHP Code:
public place_palletwbags(OwnerEnt

     
    if( 
palletscout == get_pcvar_num(maxpallets) ) 
    { 
        
client_print(OwnerEntprint_chat,"[ZP] For security reasons only allow %d Sandbags on the server!",get_pcvar_num(maxpallets)); 
        return 
PLUGIN_HANDLED
    } 
     
    
// create a new entity  
    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"func_wall")); 
             
    
// set a name to the entity 
    
set_pev(ent,pev_classname,"amxx_pallets"); 

    
entity_set_int(entEV_INT_iuser1OwnerEnt)
   
    
// set model         
    
engfunc(EngFunc_SetModel,ent,g_models[random(sizeof g_models)]); 
     
    
// register a new var. for origin 
    
static Float:xorigin[3]; 
    
get_user_hitpoint(OwnerEntxorigin); 
     
     
    
// check if user is aiming at the air  
    
if(engfunc(EngFunc_PointContents,xorigin) == CONTENTS_SKY
    {      
        
client_print(OwnerEntprint_chat,"[ZP] You can not put sandbags in the sky!");            
        return 
PLUGIN_HANDLED
    } 
     
     
    
// set sizes 
    
static Float:p_mins[3], Float:p_maxs[3]; 
    
p_mins PALLET_MINS
    
p_maxs PALLET_MAXS
    
engfunc(EngFunc_SetSizeentp_minsp_maxs); 
    
set_pev(entpev_minsp_mins); 
    
set_pev(entpev_maxsp_maxs ); 
    
set_pev(entpev_absminp_mins); 
    
set_pev(entpev_absmaxp_maxs ); 

     
    
// set the rock of origin where is user placed 
    
engfunc(EngFunc_SetOriginentxorigin); 
         
    
// make the rock solid 
    
set_pev(ent,pev_solid,SOLID_BBOX); // touch on edge, block 
     
    // set the movetype 
    
set_pev(ent,pev_movetype,MOVETYPE_FLY); // no gravity, but still collides with stuff 
     
    // now the damage stuff, to set to take it or no 
    // if you set the cvar "pallets_wbags_health" 0, you can't destroy a pallet with bags 
    // else, if you want to make it destroyable, just set the health > 0 and will be 
    // destroyable. 
    
new Float:p_cvar_health get_pcvar_float(phealth); 
    switch(
p_cvar_health
    { 
        case 
0.0 
        { 
            
set_pev(ent,pev_takedamage,DAMAGE_NO); 
        } 
         
        default : 
        { 
            
set_pev(ent,pev_health,p_cvar_health); 
            
set_pev(ent,pev_takedamage,DAMAGE_YES); 
        } 
    } 
     
             
    static 
Float:rvec[3]; 
    
pev(OwnerEntpev_v_anglervec); 
     
    
rvec[0] = 0.0
     
    
set_pev(entpev_anglesrvec); 
    
    
set_pev(entpev_groupinfoGROUP_T)
     
    
// drop entity to floor 
    
fm_drop_to_floor(ent); 
     
    
// num .. 
    
palletscout++; 
     
    return 
PLUGIN_HANDLED


Last edited by wicho; 12-27-2014 at 21:03.
wicho 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 15:17.


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