This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

filtred entity SOLID state


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 06-27-2013 , 18:35   filtred entity SOLID state
Reply With Quote #1

Hello, I ask you for help, any methods how to make entity SOLID for specific player and SOLID_NOT for everyone else.

I have only one idea to use touch and check if it is "specific player" allow them to stand on them.. and if not -> go thought (make SOLID_NOT )...

but i think it is bad idea, cause I can't imagine what if in one moment 10+ players will be touch same entity.. and one of them is "true"..
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-27-2013 , 18:44   Re: filtred entity SOLID state
Reply With Quote #2

umm, use loop
TheDS1337 is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 06-28-2013 , 03:28   Re: filtred entity SOLID state
Reply With Quote #3

you would have said to use the amxx..


maybe more info than only one procedure..?

what exactly i need loop for?
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-28-2013 , 04:21   Re: filtred entity SOLID state
Reply With Quote #4

I Think It will be something like this:
Code:
static iPlayers; for( iPlayers = 1; iPlayers <= get_maxplayers( ); iPlayers++ ) {     if( id ) /* Player Index */         set_pev( iEntity, pev_solid, /* Solid Type */ ) /* Entity Index */             set_pev( iPlayers, pev_solid, SOLID_NOT ); }

Last edited by TheDS1337; 06-28-2013 at 04:21.
TheDS1337 is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 06-28-2013 , 04:27   Re: filtred entity SOLID state
Reply With Quote #5

oh you give a brilliant idea to set player SOLID_NOT !!

before i think to make main entity solid_not

will try thanks.


tried to use fullpack action, but not work. ;x .. what i'm doing wrong?
PHP Code:
public fwd_addtofullpack_post(eseiEntityidiFlagsiPlayerpSet){
    if (
pev_valid(iEntity)){
        new 
szName[32]
        
pev(iEntitypev_classnameszName31)
        if (
id != iEntity && is_user_alive(id) && equal(szName"my_mega_entity_class")){
            if (
pev(iEntitypev_iuser1) != id )
            {
                    
set_es(esES_SolidSOLID_NOT)
                    
set_pev(id,pev_solid,SOLID_NOT);
                    
//server_print("solid not! iuser1: %d, id: %d, iPlayer: %d",pev(iEntity, pev_iuser1),id,iPlayer);
            
}
          
        }
    }
    
    return 
FMRES_IGNORED

one more idea.. to make user noclip. for 0.1 second.. but i think this is not good idea.


yeah i take it..

but tested with 2 players. but problem if 3+ players will touch it at one moment....
PHP Code:
public Ham_TouchEnt(idiEntity)
{
    if(
is_user_alive(id) && pev_valid(iEntity))
    {
        new 
szName[32];
        
pev(iEntitypev_classnameszName31);
        if (
id != iEntity && equal(szName"my_mega_class...")){
            if (
pev(iEntitypev_iuser1) != id )
            {
                    
set_pev(iEntitypev_ownerid)
            }

        }
        
    }

__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 06-28-2013 at 05:27.
AngeIII is offline
Send a message via Skype™ to AngeIII
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 07-31-2013 , 17:18   Re: filtred entity SOLID state
Reply With Quote #6

i wan't to up this topic again cause i can't find any possible way to solve this problem.

i think about make entity SOLID_NOT for everyone and check touches when toucher=owner allow them to stand on entity. but how to do that i don't know..

if i set set_pev(iEntity, pev_owner, id) it works only for 1/2 players but if more than 2 stand on one entity it will stuck.
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-31-2013 , 17:30   Re: filtred entity SOLID state
Reply With Quote #7

Set entity to SOLID_NOT at player CmdStart and set back its property at PostThink or CmdEnd

See engine workflow : https://forums.alliedmods.net/showthread.php?p=2002784


Also, one thing you should do when changing solid property is to send setsize or setorigin (without changing entity value), so entity is re-evaluated by the engine.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-31-2013 at 17:31.
ConnorMcLeod is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 09-20-2013 , 18:28   Re: filtred entity SOLID state
Reply With Quote #8

bump

I didnt understand how todo it please post code
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
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 23:47.


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