Raised This Month: $ Target: $400
 0% 

Set time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FoX Rider
Member
Join Date: Feb 2005
Location: AK
Old 02-27-2005 , 16:46   Set time
Reply With Quote #1

How would you set a certain time limit, for a plugin to last?
Example: Noclip for 10 seconds.
__________________
Ride for fox..Die for fox.
FoX Rider is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 02-27-2005 , 17:04  
Reply With Quote #2

You use the set_task() native :
Code:
Public Function(id) {    set_task(10.0,"FunctionName",id) } public FunctionName(id) {    set_user_noclip(id,1) }
Get it?
Peli is offline
Send a message via MSN to Peli
FoX Rider
Member
Join Date: Feb 2005
Location: AK
Old 02-27-2005 , 17:25  
Reply With Quote #3

Uh-huh. Thanks Peli.
__________________
Ride for fox..Die for fox.
FoX Rider is offline
FoX Rider
Member
Join Date: Feb 2005
Location: AK
Old 02-27-2005 , 18:19  
Reply With Quote #4

Wait, so..

Code:
Public Function(id) 
{ 
   set_task(10.0,"FunctionName",id) 
} 

public FunctionName(id) 
{ 
   set_user_noclip(id,1) 
}
Im not following. Can u do a sample.
__________________
Ride for fox..Die for fox.
FoX Rider is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-27-2005 , 19:01  
Reply With Quote #5

Code:
public doNoclip(id) {    set_user_noclip(id,1) // Set noclip    set_task(10.0,"remNoclip",id) // After ten secs, run remNoclip } public remNoclip(id) { // Remove noclip    set_user_noclip(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
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 02-28-2005 , 19:40  
Reply With Quote #6

No problem , Vex explained it better than I did , sorry forgot to explain it. If you still need help , ask.
Peli is offline
Send a message via MSN to Peli
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-01-2005 , 10:56  
Reply With Quote #7

Should be:

Code:
public doNoclip(id) {    set_user_noclip(id,1) // Set noclip     new args[2]     args[0] = id    set_task(10.0,"remNoclip", 0, args, 1) // After ten secs, run remNoclip } public remNoclip( args[] ) {     new id = args[0] // Remove noclip    set_user_noclip(id,0) }
xeroblood is offline
Send a message via MSN to xeroblood
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-01-2005 , 12:16  
Reply With Quote #8

Yea yea yea, xero.. LOL

Always gotta be the bigshot . I was just showin him the basics.
__________________
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
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 14:11.


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