Raised This Month: $ Target: $400
 0% 

invisibility


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
delayedCoder
Junior Member
Join Date: Jul 2011
Location: under binary
Old 07-29-2011 , 00:30   Re: invisibility
Reply With Quote #2

Here's something to get you going:
This will detect if a user has been idle for 5 seconds, if so, they will be invisible.

Note: There is no team detection or crouch method.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <fakemeta> #define PLUGIN "Blah" #define VERSION "1.0" #define AUTHOR "delayedCoder" new Float:lastMove[33]; public plugin_init() {         register_forward(FM_PlayerPreThink, "fw_playerprethink", 1);     } public fw_playerprethink(id) {         static Float:velocity[3];         pev(id,pev_velocity,velocity);         new Float:time = get_gametime();         if(velocity[1] || velocity[0] || velocity[2] || !(pev(id,pev_frags) & FL_ONGROUND))         lastMove[id] = time;         if(time-lastMove[id] >= 5.0)     {         set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 20);         lastMove[id] = time;     }         return FMRES_IGNORED; }
delayedCoder 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 00:47.


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