Raised This Month: $ Target: $400
 0% 

Invisibility


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-10-2011 , 11:46   Re: Invisibility
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <engine>
#include <fun>

#define PLUGIN "Invisibility"
#define VERSION "1.0"
#define AUTHOR "ConnorMcLeod"

new g_iInvisFactor 1

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    new 
iEnt
    iEnt 
create_entity("info_target")
    
entity_set_string(iEntEV_SZ_classname"check_speed")
    
entity_set_float(iEntEV_FL_nextthinkget_gametime() + 0.1)
    
register_think("check_speed""Set_Furiens_Visibility")
}

public 
Set_Furiens_Visibility(iEnt)
{
    
entity_set_float(iEntEV_FL_nextthinkget_gametime() + 0.1)

    new 
iPlayers[32], iNumFloat:fVecVelocity[3], iSpeed

    get_players
(iPlayersiNum"a")

    new 
iPlayer;
    for(new 
iiNumi++)
    {
        
iPlayer iPlayers[i]
        if(
get_user_weapon(iPlayer) == CSW_KNIFE)
        {
            
entity_get_vector(iPlayerEV_VEC_velocityfVecVelocity)
            
iSpeed floatround(vector_length(fVecVelocity))
            if(
iSpeed g_iInvisFactor*255)
            {
                
set_user_rendering(iPlayerkRenderFxNone000kRenderTransAlphaiSpeed/g_iInvisFactor)
            }
            else
            {
                
set_user_rendering(iPlayerkRenderFxNone000kRenderNormal0)
            }
        }
        else
        {
            
set_user_rendering(iPlayerkRenderFxNone000kRenderNormal0)
        }
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 03:25.


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