View Single Post
Author Message
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 01-21-2019 , 21:30   Forcing a player with a different groupinfo to render (AddToFullPack)
Reply With Quote #1

Hello

I'm trying to render a player from another groupinfo using AddToFullPack.

I'm returning 1 on this forward to force a propagation to the client but it doesn't seem to be working.

What I am doing wrong? How can I achieve this?

Code:
public plugin_init() {     register_forward(FM_AddToFullPack, "pred", 1) } /* AddToFullPack Return 1 if the entity state has been filled in for the ent and the entity will be propagated to the client, 0 otherwise · "ent_state" is the server maintained copy of the state info that is transmitted     to the client a MOD could alter values copied into state to send the "host" a     different look for a particular entity update, etc. · "e" and "edict_t_ent" are the entity that is being added to the update, if 1 is returned · "edict_t_host" is the player's edict of the player whom we are sending the update to · "player" is 1 if the ent/e is a player and 0 otherwise · "pSet" is either the PAS or PVS that we previous set up.      We can use it to ask the engine to filter the entity against the PAS or PVS.     we could also use the pas/ pvs that we set in SetupVisibility, if we wanted to.  Caching the value is valid in that case, but still only for the current frame */ public pred(ent_state,e,edict_t_ent,edict_t_host,hostflags,player,pSet) {        if(player)     {         [...]         forward_return(FMV_CELL,1);         return FMRES_OVERRIDE;     }         return FMRES_IGNORED; }

Thanks in advance.

EDIT: Forgot my return value, recompiled the plugin but it still doesn't work.
__________________

Last edited by gabuch2; 01-21-2019 at 23:14. Reason: Code edit.
gabuch2 is offline