Raised This Month: $ Target: $400
 0% 

Some questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-22-2005 , 21:48   Some questions
Reply With Quote #1

How would I make a kRenderFxGlowShell flashing? I know how to do It normally.

How would you use a hud_msg to display a new color every second or so. Such as from red to blue, green to red, orange to pink, etc. Also, how to detect the time that a function lasts?

Which leads to my next question, how would you set a time of how long a function will work.
Unidentified is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 12-22-2005 , 22:33  
Reply With Quote #2

set_task() answers just about all of those.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-22-2005 , 23:34  
Reply With Quote #3

I know that much Suicid3, but I'm unsure of which way to use It. Could you post a small sample?
Unidentified is offline
aLpiNe^cLuBz
Member
Join Date: Dec 2005
Old 12-23-2005 , 02:30  
Reply With Quote #4

Code:
set_task(5.0,"function",0)
That will repeat your function every 5 seconds.
__________________
AlpineRP - Working on...
HaloMod - Working on...
aLpiNe^cLuBz is offline
Send a message via AIM to aLpiNe^cLuBz
VEN
Veteran Member
Join Date: Jan 2005
Old 12-23-2005 , 02:38  
Reply With Quote #5

It depend on where you would put it (inside or outside your function).
VEN is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 12-23-2005 , 08:53  
Reply With Quote #6

Quote:
Originally Posted by aLpiNe^cLuBz
Code:
set_task(5.0,"function",0)
That will repeat your function every 5 seconds.
No, it won't, it will run only 1 time

This is the correct 1:

Code:
set_task(5.0, "myFunction",_, _, _,"b")
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-24-2005 , 15:34  
Reply With Quote #7

Okay. I know there Is a set task. But I'm confused on the way you'd use It. Such as If I wanted to give godmode to a player for thirty seconds, how would I do that?
Unidentified is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-24-2005 , 15:38  
Reply With Quote #8

Code:
public give_god( id ) {   set_user_godmode(id, 1);   set_task(30.0, "remove_god", id); } public remove_god( id ) {   set_user_godmode(id, 0); }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-25-2005 , 17:23  
Reply With Quote #9

Thank you. Now one last question. How would you set a multi-glow(flashing), such as Red Blue, Red Blue -- looping... What I did was

Code:
public glowthing(id) { set_user_rendering(id,kRenderFxGlowShell,255,255,255,kRenderNormal,16) set_task(1.0, "glowthing2", id); } public glowthing2(id) { set_user_rendering(id,kRenderFxGlowShell,255,0,255,kRenderNormal,16) set_task(1.0, "glowthing", id); }

Thanks.
Unidentified is offline
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-26-2005 , 22:32  
Reply With Quote #10

Anyone?....
Unidentified 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 15:55.


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