Raised This Month: $ Target: $400
 0% 

Invisible and visible for player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
langgiong123
Junior Member
Join Date: Feb 2014
Old 07-27-2014 , 02:53   Re: Invisible and visible for player
Reply With Quote #5

Quote:
Originally Posted by Eagle07 View Post
use this ^^
PHP Code:
#include <amxmodx> 
#include <engine> 
#include <fun> 

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

new g_iInvisFactor 

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
        } 
    } 

Thank you so much, it work
langgiong123 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 13:06.


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