Raised This Month: $ Target: $400
 0% 

Problem w/ FM_AddToFullPack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spriite
Member
Join Date: Aug 2010
Old 07-07-2012 , 13:51   Problem w/ FM_AddToFullPack
Reply With Quote #1

I tried using this plugin, but the entity stays solid.

PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
 
new bool:g_hasAccess[33];
 
public 
plugin_init() {
        
register_forward(FM_AddToFullPack"fw_AddToFullPack_post"1);
}
 
public 
client_putinserver(id)
        if(
get_user_flags(id)& ADMIN_IMMUNITY)
                
g_hasAccess[id] = true;
 
public 
fw_AddToFullPack_post(es_handleeenthosthflagsplayerset)
{
        if(!
player && pev_valid(ent) && g_hasAccess[host])
        {
                static 
szClass[20];
                
pev(entpev_classnameszClasscharsmax(szClass));
                if(
equal(szClass"some_ent"))
                        
set_es(es_handleES_SolidSOLID_NOT);
        }

What's wrong with my code?

Obs: sorry for my bad english.

Last edited by Spriite; 07-07-2012 at 13:55.
Spriite is offline
WooMhotes
Junior Member
Join Date: May 2012
Old 07-07-2012 , 21:23   Re: Problem w/ FM_AddToFullPack
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
 
new bool:g_hasAccess[33];
 
public 
plugin_init()
{
        
register_plugin"blabla""1.0""blabla" );
        
register_forward(FM_AddToFullPack"fw_AddToFullPack_post"1);
}
 
public 
client_putinserver(id)
{
        
g_hasAccess[id] = (get_user_flags(id)& ADMIN_IMMUNITY) ? true false ;
}

 
public 
fw_AddToFullPack_post(es_handleeenthosthflagsplayerset)
{
        if( 
g_hasAccess[host] && pev_valid(ent) )
        {
                static 
szClass[33];
                
pev(entpev_classnameszClasscharsmax(szClass));

                if( 
equal(szClass"some_ent") )
                {
                        
set_es(es_handleES_SolidSOLID_NOT);
                }
        }

WooMhotes is offline
Spriite
Member
Join Date: Aug 2010
Old 07-07-2012 , 21:31   Re: Problem w/ FM_AddToFullPack
Reply With Quote #3

Don't works...
Spriite is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-08-2012 , 05:13   Re: Problem w/ FM_AddToFullPack
Reply With Quote #4

AddToFullPack is only for visual (hud and prediction), it can't change an entity from solid state to not solid state.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-08-2012 , 06:58   Re: Problem w/ FM_AddToFullPack
Reply With Quote #5

You could try to check touch and set the entity's owner (pev_owner) to the player that touches it if he has the needed access flag. That will make the entity solid for all other players, except for the owner. If another player tries to touch it, the entity will be solid. If that player has the access too - he will be the new owner and he will move trough it... But I'm not sure how good it will work if there are two or more players with that flag, touching the entity at the same time.
__________________
<VeCo> is offline
Reply


Thread Tools
Display Modes

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 14:59.


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