Raised This Month: $ Target: $400
 0% 

setting EF_NODRAW on a player (rendering them with no alpha wont work)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-20-2010 , 19:53   Re: setting EF_NODRAW on a player (rendering them with no alpha wont work)
Reply With Quote #3

okay, thanks exolent, but my code is failing to work, it will keep resetting invisibility when someone is NOT holding attack key, which is the opposite of what I was aiming for, I want to set the user as visible when they are previously invisible and are holding the attack key. (if that makes sense)

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <fun>
#include <fakemeta>

#define PLUGIN "Block Spy Invisible Sniping"
#define VERSION "1.0"
#define AUTHOR "Master"

new m_LaserBeam //= precache_model("sprites/laserbeam.spr");

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_CmdStart"fwdCmdStart");
    
}

public 
plugin_precache()
    
m_LaserBeam precache_model("sprites/laserbeam.spr");


public 
fwdCmdStart(iduc_handleuc_seed)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED;
    
    static 
iButton;
    
iButton get_uc(uc_handleUC_Buttons);
    
//new NoDraw = pev(id, pev_effects, EF_NODRAW)
    
    
if(~iButton IN_ATTACK)
    {
        if(!
get_entity_visibility(id))
        {
            
            new 
origin[3]
            
get_user_origin(idorigin0)
            
//do stuff
            
message_begin(MSG_PVSSVC_TEMPENTITYoriginid)
            
write_byteTE_BEAMCYLINDER );
            
write_coordorigin[0] );
            
write_coordorigin[1] );
            
write_coordorigin[2] );
            
write_coordorigin[0] );
            
write_coordorigin[1] );
            
write_coordorigin[2] + 512 );
            
write_shortm_LaserBeam );
            
write_byte); // startframe
            
write_byte); // framerate
            
write_byte); // life
            
write_byte);  // width
            
write_byte);   // noise
            
write_byte255 );   // r, g, b
            
write_byte255 );   // r, g, b
            
write_byte255 );   // r, g, b
            
write_byte128 ); //brightness
            
write_byte);        // speed
            
message_end();
            
            
            
//pEntity->v.effects |= EF_NODRAW;
            //set_pev(id,pev_effects, & ~EF_NODRAW);
            //set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25); //THIS FAILS TO WORK
            
set_entity_visibility(id1)
        }
    }
    return 
FMRES_IGNORED;

__________________
+|- KARMA Respectively

HLM is offline
 



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 03:42.


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