Raised This Month: $51 Target: $400
 12% 

Origin Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bruno
Member
Join Date: Jun 2005
Old 01-08-2006 , 16:10   Origin Question
Reply With Quote #1

I made a mod for TSRP. The problem I have though is everytime the player types the command for the mod, they can just use it and run away and the plugin will still perform the action even though they are not at the spot. How would I make it stop the task if they move too far from the position?
__________________
If you have but one shot at an opportunity, make it count.
Bruno is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-08-2006 , 16:19  
Reply With Quote #2

Code:
new total_dist, origin[3], p_origin[3]; get_user_origin(id, p_origin); // edit these to the specific origin you want origin[0] = x; origin[1] = y; origin[2] = z; total_dist = get_distance(origin, p_origin); // edit 500 to whatever if(total_dist > 500) {   // too far!   // remove_task( ... ); }
__________________
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
Bruno
Member
Join Date: Jun 2005
Old 01-08-2006 , 16:26  
Reply With Quote #3

I have already defined a position that the player has to be in. I was able to use it by changing a couple of things. Thanks a lot v3x.
__________________
If you have but one shot at an opportunity, make it count.
Bruno 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 19:42.


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