Raised This Month: $ Target: $400
 0% 

amount fade!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
busemann
Junior Member
Join Date: Sep 2005
Old 10-27-2005 , 13:21   amount fade!
Reply With Quote #1

just for an example: set_user_rendering 250... how do i make it to "fade" into 1 in 5 sec
busemann is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-27-2005 , 14:31  
Reply With Quote #2

use set_task.
You need to define the fading values or write some kind of an equation which shouldnt be hard.
Freecode is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 10-27-2005 , 15:47  
Reply With Quote #3

You'd want a task a some sort of loop.
A for-loop would be smooth, but it would take less than 1 second to fade into invisibility, so you would want to use a task.
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-27-2005 , 18:22  
Reply With Quote #4

something like...
Code:
public IsInvis(id) {     new tempvis     new tempvis2     tempvis = tempvis2     if ( tempvis > 0 ) {         tempvis2 = tempvis - 1         set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, tempvis2 )         set_task( 0.05, "IsInvis", id )     }     if ( tempvis == 0 ) {         set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0 )         set_task( 0.2, "IsInvis", id )     } }
?
[ --<-@ ] Black Rose is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-27-2005 , 19:40  
Reply With Quote #5

Code:
    new tempvis     new tempvis2     tempvis = tempvis2     if ( tempvis > 0 ) {         tempvis2 = tempvis - 1

your not setting values for these so there auto 0
Freecode is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-28-2005 , 11:16  
Reply With Quote #6

lol i forgot that... well i dunno how to... i can do it in my script... but then i just add tempvis = 255 when command is used... btr soloution?
[ --<-@ ] Black Rose is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-28-2005 , 15:06  
Reply With Quote #7

Code:
#include <amxmodx> #include <fun> #define PLUGIN "Invis Fade" #define VERSION "1.0" #define AUTHOR "Zenith77" new iFade[33] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)           register_clcmd("amx_invis", "Invis",  "makes you fade to inivsible") } public client_connect(id) {       iFade[id] = 0 } public Invis(id) {       if ( iFade[id] <= 255 ) {                 iFade[id] ++         set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, iFade[id] )         set_task( 0.2, "Invis", id )     }    if( iFade[id] >= 255) {         iFade[id] = 0    }      return PLUGIN_HANDLED }

I would make this script better and also check it to see if works, but i am at a friends house right now, so i cant :/.


If you do compile this then you may get some loose indention errors

--Zenith77
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-28-2005 , 15:15  
Reply With Quote #8

i don't really get ur script... i don't think it'll work...
( does ++ means +1? )
[ --<-@ ] Black Rose is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-28-2005 , 15:18  
Reply With Quote #9

Yes, and -- means -1
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-28-2005 , 15:22  
Reply With Quote #10

okey Zenith... thx

but i still think your script wont work
[ --<-@ ] Black Rose 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 23:41.


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