Raised This Month: $ Target: $400
 0% 

Keeping entity at a distance


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-25-2021 , 06:35   Re: Keeping entity at a distance
Reply With Quote #11

PHP Code:
public ent_ThinkPre(iEnt)
{
    if(!
pev_valid(iEnt))
        return

    static 
className[32]
    
pev(iEntpev_classnameclassNamecharsmax(className))

    if(!
equali(classNameg_szClassName)) 
    {
        return
    }

    new 
id pev(iEntpev_owner)

    if(
is_user_alive(id))
    {
        new 
Float:fStartPos[3], Float:fvOFS[3], Float:fAngles[3]
        
pev(idpev_originfStartPos)
        
pev(idpev_view_ofsfvOFS)
        
pev(idpev_anglesfAngles)
        
fAngles[0] = 0.0
        fStartPos
[2] += fvOFS[2]
        
set_pev(iEntpev_originfStartPos)
        
set_pev(iEntpev_anglesfAngles)
        
shift_entity_position(iEnt100.00.0, -fvOFS[2])
        
        if(
get_user_button(id) & IN_FORWARD)
        {
            
entity_set_aim(iEntidtrue);
        }
        else
        {
            
entity_set_aim(iEntid);
        }
    } 

    
engfunc(EngFunc_DropToFlooriEnt)

    
set_pev(iEntpev_nextthinkget_gametime() + 0.01)

Uncomment the part you commented out, inside the shift_entity_position function and undo all the modification you did to the function.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-25-2021 at 06:43.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 


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 07:43.


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