Raised This Month: $ Target: $400
 0% 

MOVETYPE_NOCLIP with gravity and physics?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GasmoN
Member
Join Date: Jul 2014
Old 01-26-2019 , 12:55   MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #1

Is there any way to make that player X can go through all other players and all other players can go through player X ONLY but not through each other?
Basicly, I need what this plugin is doing but only with different method.
https://forums.alliedmods.net/showthread.php?p=562944
I don't want to use server_frame, Touch, or any other forwards.
I tried something like this:

PHP Code:
set_pev(idpev_movetypeMOVETYPE_NOCLIP)
set_pev(idpev_solidSOLID_BSP

But I want that player can walk/run/jump around the map and be able to go through other players, and not "fly" with noclip.

Last edited by GasmoN; 01-26-2019 at 12:57.
GasmoN is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 01-26-2019 , 13:38   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #2

pev_groupinfo, however, it will make him invisible to other players, so you need to render him with AddToFullpack
__________________

Last edited by gabuch2; 01-26-2019 at 13:38.
gabuch2 is offline
GasmoN
Member
Join Date: Jul 2014
Old 01-26-2019 , 14:37   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #3

Okay, I managed to do this with pev_groupinfo. (When I use /aspec command, I move all players to group 1 and me to group 2) but now I can't see other players and they can't see me. How can I render me to them and them to me? I need example since didn't worked with AddToFullpack so far, but I did found this https://www.amxmodx.org/api/fakemeta..._AddToFullPack
GasmoN is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 01-26-2019 , 14:39   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #4

Check out my thread from some days ago.
__________________
gabuch2 is offline
GasmoN
Member
Join Date: Jul 2014
Old 01-26-2019 , 14:51   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #5

I don't get it at all now.

This is the part where i go to aspec but I don't know what do I need to add to render players.

PHP Code:
    if(!g_IsAspec[id])
    {
        
g_IsAspec[id] = true;
        
        if(
cs_get_user_team(id) != CS_TEAM_CT)
        {
            
cs_set_user_team(idCS_TEAM_CT)
            
ExecuteHamB(Ham_CS_RoundRespawnid)
        }
        else
        {
            
ExecuteHamB(Ham_CS_RoundRespawnid)
        }
        
        
set_user_rendering(idkRenderFxDistort000kRenderTransAdd127);
        
set_user_godmode(id1)
        
cs_set_user_team(idCS_TEAM_SPECTATOR)
        
set_group(id2)
        new 
i;
        new 
mp get_maxplayers()
        
        for(
1<= mpi++)
        {
            if(!
is_user_alive(i) || id == i)
            continue;
            
            
set_group(iGROUP_DEFAULT)
        }

GasmoN is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-26-2019 , 21:24   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #6

My suggestion is not to use grouinfo, but setting aspec-ent semiclip (solid_not and solid_slidebox) and make it invis to other players, it will work 100%.. See example in prokreedz plugin
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 01-26-2019 at 21:25.
JocAnis is offline
GasmoN
Member
Join Date: Jul 2014
Old 01-27-2019 , 07:09   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #7

Quote:
Originally Posted by JocAnis View Post
My suggestion is not to use grouinfo, but setting aspec-ent semiclip (solid_not and solid_slidebox) and make it invis to other players, it will work 100%.. See example in prokreedz plugin
I tried that, but that way players can go through me but I can't go through them.
I set all players to be solid_slidebox and me to be solid_not.
GasmoN is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-27-2019 , 08:42   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #8

Show your code? I think you didnt made it good with indexes
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
GasmoN
Member
Join Date: Jul 2014
Old 01-27-2019 , 13:20   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #9

PHP Code:
public player_spawn_post(id)
{
        if(!
is_user_alive(id))
        return;

        if(
g_IsAspec[id])
        return;

        
set_pev(idpev_solidSOLID_SLIDEBOX)

PHP Code:
public cmd_aspec(id)
{
    if(!
access(idADMIN_RCON))
    return 
PLUGIN_HANDLED;
    
    if(!
g_IsAspec[id])
    {
        
g_IsAspec[id] = true;
        
        if(
cs_get_user_team(id) != CS_TEAM_CT)
        {
            
cs_set_user_team(idCS_TEAM_CT)
            
ExecuteHamB(Ham_CS_RoundRespawnid)
        }
        else
        {
            
ExecuteHamB(Ham_CS_RoundRespawnid)
        }
        
        
set_user_rendering(idkRenderFxDistort000kRenderTransAdd60);
        
set_user_godmode(id1)
        
cs_set_user_team(idCS_TEAM_SPECTATOR)
                
set_pev(idpev_solidSOLID_NOT)
    }
    else
    {        
        
g_IsAspec[id] = false;
        
BackToTeam(id)
    }
    
    return 
PLUGIN_HANDLED;

GasmoN is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-27-2019 , 14:15   Re: MOVETYPE_NOCLIP with gravity and physics?
Reply With Quote #10

w8..you want to go through ALL and ALL through you? i think its just simple: SOLID_NOT (cmd_aspec)..unless you have some other plugin which is doing semiclip things ?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
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 20:27.


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