Raised This Month: $ Target: $400
 0% 

Getting round start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-18-2005 , 21:12   Getting round start
Reply With Quote #1

Hey, how can I return a value when the round is started?
__________________
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
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 02-18-2005 , 22:49   try this
Reply With Quote #2

Alot of people like to user ResetHud, but personally the REAL event is this:

Code:
register_logevent("restart_event", 2, "1=Round_Start")

Enjoy
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-18-2005 , 23:14  
Reply With Quote #3

So..

Code:
new round = register_logevent("restart_event", 2, "1=Round_Start") if(round == 1) { // do something }

Also, how do I make a player freeze for the same amount of time as the freeze time?
__________________
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
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 02-18-2005 , 23:54  
Reply With Quote #4

lol NOOOOOOOOO! lol.... THIS:

Code:
public plugin_init() {     register_logevent("restart_event", 2, "1=Round_Start") } public restart_event() {     add code here }
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-18-2005 , 23:57  
Reply With Quote #5

LOL, oops! What about my other

PS: Ignore me, I'm an AMXX noob!
__________________
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
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-19-2005 , 12:16  
Reply With Quote #6

Hehe, v3x, making the switch from PHP to Small. And now go back and forget all your $ symbols!

Anyway, you can use get_cvar_float("mp_freezetime") to get how long the freezetime is, then you could use set_user_maxspeed(id,1.0) to freeze them, use set_task with the amount of time from the freezetime to set a task that sets their maxspeed back to 320.0.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-19-2005 , 19:00  
Reply With Quote #7

Quote:
Originally Posted by XxAvalanchexX
Hehe, v3x, making the switch from PHP to Small. And now go back and forget all your $ symbols!

Anyway, you can use get_cvar_float("mp_freezetime") to get how long the freezetime is, then you could use set_user_maxspeed(id,1.0) to freeze them, use set_task with the amount of time from the freezetime to set a task that sets their maxspeed back to 320.0.
Good idea, but my noob ass doesn't know how to do that, lol.
__________________
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
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-19-2005 , 19:57  
Reply With Quote #8

Have you read any of the tutorials? There is a big sticky topic in the Scripting Help forum.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-19-2005 , 20:23  
Reply With Quote #9

Code:
new bool:speed = true public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("CurWeapon", "check_speed", "be")     register_cvar("sv_knifespeed", "410.0")     register_cvar("sv_c4speed", "410.0")     register_cvar("sv_awpspeed", "320.0")     register_logevent("new_round",2,"1=Round_Start") } public new_round() {     new ft = get_cvar_num("mp_freezetime")     set_task(float(ft), "allow_speed", 0)     return PLUGIN_CONTINUE } public allow_speed() {     speed = true     return PLUGIN_CONTINUE } public check_speed(id) {     if(speed == false)         return PLUGIN_CONTINUE     new clip, ammo     new weapon = get_user_weapon(id, clip, ammo)     switch (weapon) {         case CSW_KNIFE: set_user_maxspeed(id,(get_cvar_float("sv_knifespeed")))         case CSW_C4: set_user_maxspeed(id,(get_cvar_float("sv_c4speed")))         case CSW_AWP: set_user_maxspeed(id,(get_cvar_float("sv_awpspeed")))     }     return PLUGIN_CONTINUE }
But it still doesn't work!
__________________
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
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-20-2005 , 00:52  
Reply With Quote #10

You never set speed to false...
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply


Thread Tools
Display Modes

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:04.


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