Raised This Month: $51 Target: $400
 12% 

Solved How is it possible to remove entity collision for certain players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-22-2023 , 18:40   How is it possible to remove entity collision for certain players
Reply With Quote #1

How is it possible to remove entity collision for certain players?

Unfortunately pfnShouldCollide only works for regular entities when they collide with each other, it doesn't work with player entity.

I tried hooking PM_Move Pre and setting the desired entity to nonsolid then in PM_Move Post setting it back as solid but no prevail !!!

any help ?
__________________
@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-30-2023 at 04:58.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-22-2023 , 19:48   Re: How is it possible to remove entity collision for certain players
Reply With Quote #2

Quote:
Originally Posted by Natsheh View Post
How is it possible to remove entity collision for certain players?

Unfortunately pfnShouldCollide only works for regular entities when they collide with each other, it doesn't work with player entity.

I tried hooking PM_Move Pre and setting the desired entity to nonsolid then in PM_Move Post setting it back as solid but no prevail !!!

any help ?
return plugin continue with register touch with after the conditions you specify( to ignore the touch ), o plugin handled to completely stop the touch and the touches that follow
PHP Code:
register_touch"Your Entity Classname""player",  "fw_touch" ); // for players touched

public fw_touchtouchedtoucher )
{
        if( ) 
// your condition
        
{
             return 
PLUGIN_ // CONTINUE TO IGNORE, HANDLED TO STOP, HANDLED_MAIN TO STOP IT, INCLUDING PFN_TOUCH.
        
}
        return 
PLUGIN_CONTINUE;


Last edited by MrPickles; 08-22-2023 at 19:48.
MrPickles is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-22-2023 , 20:04   Re: How is it possible to remove entity collision for certain players
Reply With Quote #3

This will just stop the touch function call, it has nothing to do with collision.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
JocAnis
Veteran Member
Join Date: Jun 2010
Old 08-22-2023 , 20:18   Re: How is it possible to remove entity collision for certain players
Reply With Quote #4

What about pev_groupinfo ?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 08-22-2023 , 21:28   Re: How is it possible to remove entity collision for certain players
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
What about pev_groupinfo ?
pev_groupinfo will just not render the entity for that this not included, doesn't help if only about collusion though
__________________
My plugin:
Celena Luna is offline
Old 08-22-2023, 23:03
fysiks
This message has been deleted by fysiks. Reason: misunderstood
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-23-2023 , 01:19   Re: How is it possible to remove entity collision for certain players
Reply With Quote #6

I tried also hooking pfnShouldCollide pre hook and setting the entity solid when a player is a CT and nonsolid for Terrorists, aswell created a hook with PM_Move Pre and set the entity to solid, it worked just fine, but when there are CTs and Ts beside it, or in it, it becomes glitchy...
And set the entity to solid in PM_Move Pre


Test code :-

PHP Code:
new g_ent;

public 
plugin_init() {

register_forward(FM_ShouldCollide"ShouldCollide")
RegisterHookChain(RG_FM_Move"Pm_Move")
}

public 
ShouldCollide(touchedpassedict)
{
    if(!(
<= touched <= 32) && !(<= passedict<= 32))
    return;
 
    static 
playerent;

    if((
<= touched<= 32))
    {
          
player touched;
          
ent passedict;
     }
     else
     {
          
player passedict;
          
ent touched;
      }

      if(
g_ent != ent) return;

      switch ( 
get_user_team(player) )
      {
            case 
1set_pev(entpev_solidSOLID_NOT);
            case 
2set_pev(entpev_solidSOLID_BBOX);
      }
}

public 
Pm_Move(id)
{
      
set_pev(g_entpev_solidSOLID_BBOX);


I believe the best way is by hooking PM_PlayerTrace and altering/changing the entity solidity there...
__________________
@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-23-2023 at 01:38.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 10:43.


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