AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   SOLID_NOT for one player. (https://forums.alliedmods.net/showthread.php?t=140575)

Owner123 10-14-2010 05:58

SOLID_NOT for one player.
 
Hi.
How i can make entity to SOLID_NOT for one player? I know, i must use FM_AddToFullPack, try with some codes but i cant do this.
I try it:
PHP Code:

public fwAddToFullPack(es_handleeentityhosthostflagsplayerpSet)
{
    if(
host == entity)
        return 
FMRES_IGNORED;
    
    static 
szClassname[32];
    
pev(entitypev_classnameszClassname31);
    
    if(
equal(szClassname"my_classname" && is_user_connected(host) && is_user_alive(host) && get_user_flags(host) & ADMIN_LEVEL_H)
            
set_es(es_handleES_SolidSOLID_NOT);
    return 
FMRES_IGNORED;


But this don't work.

Mxnn 10-14-2010 11:46

Re: SOLID_NOT for one player.
 
Try
PHP Code:

#include <engine>

entity_set_int(idEV_INT_SOLIDSOLID_NOT


Owner123 10-14-2010 12:15

Re: SOLID_NOT for one player.
 
This make entity SOLID_NOT for all player ... I want to make entity SOLID_NOT only for admins.;s

Exolent[jNr] 10-14-2010 19:15

Re: SOLID_NOT for one player.
 
Quote:

Originally Posted by Owner123 (Post 1324409)
Hi.
How i can make entity to SOLID_NOT for one player? I know, i must use FM_AddToFullPack, try with some codes but i cant do this.
I try it:
PHP Code:

public fwAddToFullPack(es_handleeentityhosthostflagsplayerpSet)
{
    if(
host == entity)
        return 
FMRES_IGNORED;
    
    static 
szClassname[32];
    
pev(entitypev_classnameszClassname31);
    
    if(
equal(szClassname"my_classname" && is_user_connected(host) && is_user_alive(host) && get_user_flags(host) & ADMIN_LEVEL_H)
            
set_es(es_handleES_SolidSOLID_NOT);
    return 
FMRES_IGNORED;


But this don't work.

Make sure you are hooking it as Post.

ARES[ro] 10-14-2010 20:09

Re: SOLID_NOT for one player.
 
its impossible editing the outgoing packets with addtofullpack cuz that will just change the client-side predictions and stuff when a player tries to go through an other player it will start predicting the movement through that person a bit and it will clutch back in place ... thats what i expect from ur code to happen.
and secondly its impossible in general to have the engine do that work for u...
try making the admin when he touches a player the player becomes SOLID_NOT then when a normal player touches the SOLID_NOT player he will get pushed back somehow with velocity or origin thats ur choice... this is the only possible way to realize that.
EDIT: also the best way to hook it is FM_Touch (pre) with fakemeta or PM_Move with orpheu

grankee 10-14-2010 21:34

Re: SOLID_NOT for one player.
 
I'm no sure but plugin for KZ_ maps doing what You need. Just look into this plugin

Owner123 10-15-2010 09:49

Re: SOLID_NOT for one player.
 
I'm hooking this from Post and Pre and this still dont work.
This is for Blockmaker ... For Barrier CT/TT/Vip Block.

ARES[ro] 10-15-2010 10:02

Re: SOLID_NOT for one player.
 
edit: oh so its not for a semiclip plugin cuz thats what u said first
ok then hook FM_Touch when player touches the block it becomes SOLID_NOT and when he goes away do a set_task and make it back solid

Owner123 10-15-2010 10:57

Re: SOLID_NOT for one player.
 
This is in standard ...

Owner123 10-15-2010 12:26

Re: SOLID_NOT for one player.
 
If you dont know what i want, dont post please -.-


All times are GMT -4. The time now is 10:19.

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