Raised This Month: $ Target: $400
 0% 

AddFullToPack entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-03-2012 , 15:41   AddFullToPack entity
Reply With Quote #1

Hello,

Bcs it only works on players,

is it possible to make it work for entities,
so we can make so some players can only see some entities and all.
__________________
Retired.

Last edited by Xalus; 05-03-2012 at 15:43.
Xalus is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-03-2012 , 16:02   Re: AddFullToPack entity
Reply With Quote #2

AddToFullPack is not for players only. You can hide entities from players with it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-03-2012 , 16:46   Re: AddFullToPack entity
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
AddToFullPack is not for players only. You can hide entities from players with it.
Hmm lol,
Didn't know that..

I touge with the tests I did it was always Players only,
but thanks for the answer.

I will test out later!
__________________
Retired.
Xalus is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-03-2012 , 17:12   Re: AddFullToPack entity
Reply With Quote #4

There is a parameter that is passed which says whether it is checking players or other entities.

Code:
public FwdAddToFullPack(es, e, ent, host, hostFlags, player, pSet) {     if(player) {         // ent is a player     } else {         // ent is some other entity     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-04-2012 , 17:39   Re: AddFullToPack entity
Reply With Quote #5

PHP Code:
public AddToFullPack_BlockeseiEntityiHostiHostFlagsiPlayerpSet ) {
    if( 
pev_valid(iEntity) && !iPlayer && is_user_alive(iHost) && get_user_team(iHost) == ) {
        new 
szClassname[32]
        
pev(iEntitypev_classnameszClassnamecharsmax(szClassname))

        if(
equali(szClassnameBLOCK)) {
            
set_esesES_SolidSOLID_BBOX )
            
//set_pev(e, pev_solid, SOLID_BBOX )
            //set_pev( e, pev_renderamt, get_block_rendering(iEntity) )
        
}
    }

It gets detected, but it doesnt go Solid,
set_pev worked, but bugged for Ts.
__________________
Retired.

Last edited by Xalus; 05-04-2012 at 17:39.
Xalus is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-04-2012 , 17:42   Re: AddFullToPack entity
Reply With Quote #6

Describe exactly what you are trying to do, which mod etc...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-04-2012 , 17:47   Re: AddFullToPack entity
Reply With Quote #7

I don't think this will completely solve it, but make sure you are hooking it as post.

Then, you need to continue like how semiclip was made:

Code:
#include <amxmodx> #include <fakemeta> #define pev_oldsolid pev_button new const BLOCK[] = "block"; new bool:gRestoreEntities; public plugin_init() {     register_forward(FM_PlayerPreThink, "FwdPlayerPreThink");     register_forward(FM_PlayerPostThink, "FwdPlayerPostThink");         register_forward(FM_AddToFulLPack, "FwdAddToFullPackPost", 1); } public FwdPlayerPreThink(id) {     if(is_user_alive(id) && get_user_team(id) == 2) {         new ent = -1;         while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", BLOCK))) {             set_pev(ent, pev_oldsolid, pev(ent, pev_solid));             set_pev(ent, pev_solid, SOLID_BBOX);         }                 gRestoreEntities = true;     } } public FwdPlayerPostThink(id) {     if(gRestoreEntities) {         new ent = -1;         while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", BLOCK))) {             set_pev(ent, pev_solid, pev(ent, pev_oldsolid));         }                 gRestoreEntities = false;     } } public FwdAddToFullPackPost(esHandle, e, ent, host, hostFlags, player, pSet) {     if(!player && pev_valid(ent) && is_user_alive(host) && get_user_team(host) == 2) {         static className[32];         pev(ent, pev_classname, className, charsmax(className));                 if(equal(className, BLOCK)) {             set_es(esHandle, ES_Solid, SOLID_BBOX);         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-04-2012 , 19:07   Re: AddFullToPack entity
Reply With Quote #8

That won't help i think, but something can be made for sure with groupinfo.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-05-2012 , 04:28   Re: AddFullToPack entity
Reply With Quote #9

Quote:
Originally Posted by ConnorMcLeod View Post
That won't help i think, but something can be made for sure with groupinfo.
Not really, bcs I still want them to see the blocks ;)


EDIT: Exolent
register_forward(FM_AddToFulLPack, "FwdAddToFulLPackPost", 1);
->
register_forward(FM_AddToFulLPack, "FwdAddToFullPackPost", 1);


But I will test it, thx!

EDIT: Exolent
Thx, it works almost perfect :p
__________________
Retired.

Last edited by Xalus; 05-05-2012 at 12:26.
Xalus 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 00:22.


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