Raised This Month: $ Target: $400
 0% 

How to make things carry over to the next round?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-06-2006 , 17:02  
Reply With Quote #2

Make a float to store the gravity:
Code:
new Float:g_fGravity[33]; // Make sure you set it to 0.0 in client_connect!
Then use the Reset HUD event:
Code:
register_event("ResetHUD", "player_spawn", "b");
In the function hooked to the event:
Code:
public player_spawn( id ) {   if(g_fGravity[id] > 0.0)   {     set_user_gravity(id, g_fGravity[id]);   } }
Then in your gravity function:
Code:
public gravity(id, level, cid) {         if(!cmd_access(id, level, cid, 2))             return PLUGIN_HANDLED             read_argv(1, arg1, 31)         read_argv(2, arg2, 9)         new target = cmd_target(id, arg1, 15)         new Float:amount = str_to_float(arg2)/800         set_user_gravity(target, amount)         g_fGravity[id] = amount // set the amount         return PLUGIN_CONTINUE }
__________________
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
 



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 16:07.


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