AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with fm_addtofullpack (https://forums.alliedmods.net/showthread.php?t=89899)

EvolDay 04-11-2009 20:39

Need help with fm_addtofullpack
 
I can't get this to work could anyone help me with this please.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>


#define PLUGIN "test"
#define VERSION "1.0"
#define AUTHOR "none"

#define ADMIN ADMIN_LEVEL_A

new bool:Invisible[33];
new 
bool:viewInvisible[33];

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);

    
register_concmd("amx_testit","testit",ADMIN,"<nick, #userid> : Make user not see other users");

    
register_forward(FM_AddToFullPack"addtofullpack",1);
}


public 
addtofullpack(es_handle,e,ent,id,host,player,pSet) {
    if(!
player
        return 
FMRES_IGNORED;
    
    if(
Invisible[ent] && viewInvisible[host])
    {
        
set_es(es_handle,ES_RenderMode,kRenderTransTexture);
            
set_es(es_handle,ES_RenderAmt,0);
    }
    return 
FMRES_IGNORED;
}

public 
client_connect(id)
{
    
Invisible[id] = true;
}

public 
client_disconnect(id)
{
    if (
Invisible[id])
    {
        
Invisible[id] = false;
    }
}

public 
testit(id,level,cid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
    
    new 
arg[32];
    
    
read_argv(1arg31)
    
    new 
player cmd_target(idargCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF);
    
    if (!
player)
        return 
PLUGIN_HANDLED;
    
    
viewInvisible[player] = true;
    
    return 
PLUGIN_HANDLED;



EvolDay 04-20-2009 06:57

Re: Need help with fm_addtofullpack
 
I still need help with this could anyone please help and thanks.

Exolent[jNr] 04-20-2009 07:07

Re: Need help with fm_addtofullpack
 
Don't bump until 2 weeks have passed.

<oops>

EvolDay 04-21-2009 05:13

Re: Need help with fm_addtofullpack
 
Sorry for the bump i thought it was 1 week, my bad.

Anyways i change it how you said but now when i use it on someone everyone goes invisible for everyone. would you know whats up with that i just want it to be invisible for the person its executed on.

Thanks

Exolent[jNr] 04-21-2009 15:56

Re: Need help with fm_addtofullpack
 
I'm sorry, you have it right. Try changing it to kRenderTransColor.


All times are GMT -4. The time now is 02:26.

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