AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Whats is AddToFullPack (https://forums.alliedmods.net/showthread.php?t=47045)

NomadCF 11-08-2006 12:23

Whats is AddToFullPack
 
what is AddToFullPack and how would one use it ?

Side I have tried looking it up inthe Wikki and in functions..but they don't really don't say any thing about it.

[ --<-@ ] Black Rose 11-08-2006 12:35

Re: Whats is AddToFullPack
 
Code:

stock DF_AddToFullPack(const STATE = 0, e, ENT, HOST, hostflags, player, set)
        return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set)

Quote:

Originally Posted by fakemeta_stocks.inc
// You can pass in 0 for global entity state handle or another entity state handle here
DLLFunc_AddToFullPack

Thats all i could find...

VEN 11-08-2006 12:49

Re: Whats is AddToFullPack
 
From the HLSDK's client.cpp
Code:
/* 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 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 ent are the entity that is being added to the update, if 1 is returned 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 */ int AddToFullPack( struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet )

NomadCF 11-08-2006 15:13

Re: Whats is AddToFullPack
 
I hate to ask this (because I think it's asking alot). But does any one have a example of this in action..

The Idea is to allow players to create/buy half model height barriers that when they duck behind the other team can not see them or the barrier. But there own team could still see them and the barrier.

Zenith77 11-08-2006 17:05

Re: Whats is AddToFullPack
 
You could very well use this for that purpose I believe, try looking the HL SDK read me (not really a read me, but its in one of the docs), it has a full explanination there.

edit
This may/may not work depending on what the client side DLL does with this info.

NomadCF 11-08-2006 23:03

Re: Whats is AddToFullPack
 
ok I think I'm on the right track (and yes I know this is way way over my head, but I'm still trying)

ok so heres what I have:

Code:

public plugin_init()       
{
        register_plugin("the_AddToFullPack","1.0","Chris L. Franklin")
        register_forward(FM_AddToFullPack,"test")
}


//struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet
public test(ent_state,e,edict_t_ent,edict_t_host,hostflags,player,pSet) {
       
        new to_player_name[125]
        new about_player_name[125]
       
        get_user_name(e,about_player_name,124)
        get_user_name(player,to_player_name,124)
       
        if (strcmp(to_player_name,"nomadcf",1)) {
                //this is to you about others players
        }
       
        if (strcmp(about_player_name,"nomadcf",1)) {
                //this is about you to others
        }
}

But now I'm kinda confused where I should turn to next. I know where I need to add code to make others not see me (in my tests above) and I know some how I also need ot return a 0 to tell AddToFullPack not to show this players model and such. I'm just not sure how.

Sorry to be just a bother-sum noob about all this.

NomadCF 11-09-2006 00:28

Re: Whats is AddToFullPack
 
oh I think I got it !!! I'll post the results in a few !!

NomadCF 11-09-2006 01:43

Re: Whats is AddToFullPack
 
This example will make any one on any other team beside yours invisble to you and you to them. I hope this helps others !!

Quote:


public plugin_init()
{
register_plugin("HideOtherTeamTest","1.0","Ch ris L. Franklin")
register_forward(FM_AddToFullPack,"test")
}


//struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet
public test(ent_state,e,edict_t_ent,host,hostflags,p layer,pSet) {

// only take effect if both players are alive & and not somthing else like a ladder
if (is_user_alive(e) && is_user_alive(host)) {

// Get players teams
new e_team = pev(e,pev_team)
new h_team = pev(host,pev_team)

// Hide people if there not on your team
if (e_team != h_team) {
set_pev(e, pev_renderamt, float(0))
set_pev(e, pev_rendermode, 1)
return 0
}
}

return 1
}

XxAvalanchexX 11-09-2006 01:56

Re: Whats is AddToFullPack
 
Have you tested this with multiple people on both teams? It seems that this would only hide you from the host of the server.

NomadCF 11-09-2006 01:59

Re: Whats is AddToFullPack
 
yes by "Host" it is refering to the player that is getting the update. Not as in server being the host.


All times are GMT -4. The time now is 06:46.

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