1. Store the locations in an inifile.
Add them to an array while you convert them to a vector. When a player deploys an object check the distance.
2. Zone3D. This is probably the best.
https://github.com/Notulp/Fougerite/blob/master/Fougerite/Fougerite/Zone3D.cs
I can send you an example code in 45 mins, I will be finishing this plugin:
Complete answer: Zone3DI'would reply like you:
"Y"
What did you just wrote to me? xD I have functions ready, but I dont know how to check 10 zones at once and not loop server like your /wipecheck for example. PLEASE NEXT TIME READ CAREFULLY SO I'LL NOT WRITE ANYTHING TWICE AGAIN. . . . . Better, read whole topic from start so you'll remember where we are now.
__author__ = 'DreTaX'
__version__ = '1.0'
import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite
class ZoneTest:
def On_Command(self, Player, cmd, args):
if cmd == "create":
zone = World.CreateZone("TestZoneee")
#DataStore.Add("Zones", Player.SteamID, zone) Possible to use datastore
Player.Message("Zone Created")
elif cmd == "mark":
#zone = DataStore.Get("Zones", Player.SteamID)
zone = World.zones['TestZoneee']
Server.Broadcast(str(zone))
if len(zone.Points) == 0:
zone.Mark(Player.X, Player.Y - 20.0)
Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
elif 0 < len(zone.Points) < 3:
zone.Mark(Player.X, Player.Y)
Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
else:
zone.Mark(Player.X, Player.Y + 20.0)
#zone.ShowMarkers() Yay!.... Doesn't work because World.Spawn is broken -.- Issue reported
Player.Message("Zone Created")
elif cmd == "inzone":
zone = World.zones['TestZoneee']
Player.Message(str(zone.GlobalContains(Player)))
Player.Message(str(zone.Contains(Player)))
elif cmd == "points":
zone = World.zones['TestZoneee']
for p in zone.Points:
Player.Message(str(p))
__author__ = 'DreTaX'
__version__ = '1.0'
import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite
class ZoneTest:
def On_Command(self, Player, cmd, args):
if cmd == "create":
zone = World.CreateZone("TestZoneee3")
#DataStore.Add("Zones", Player.SteamID, zone) Possible to use datastore
Player.Message("Zone Created")
elif cmd == "mark":
#zone = DataStore.Get("Zones", Player.SteamID)
zone = World.zones['TestZoneee3']
Server.Broadcast(str(zone))
if len(zone.Points) == 0:
zone.Mark(Player.X, Player.Y + 10.0)
Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
elif 0 < len(zone.Points) < 3:
zone.Mark(Player.X, Player.Y + 10.0)
Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
else:
zone.Mark(Player.X, Player.Y + 10.0)
#zone.ShowMarkers() Yay!.... Doesn't work because World.Spawn is broken -.- Issue reported
Player.Message("Zone Created")
elif cmd == "inzone":
zone = World.zones['TestZoneee3']
Player.Message(str(zone.GlobalContains(Player)))
Player.Message(str(zone.Contains(Player)))
elif cmd == "points":
zone = World.zones['TestZoneee3']
for p in zone.Points:
Player.Message(str(p))
Not for C#.Sorry I will work on it now. Expect it even today, and I will try to do it in C# with source in this topic to lookup.
It's easy plugin but hope that in C# it will be faster as possible for Rust.
One thing: Do Fougerite have function to reload plugin without restart?
Python does. python.reloadSorry I will work on it now. Expect it even today, and I will try to do it in C# with source in this topic to lookup.
It's easy plugin but hope that in C# it will be faster as possible for Rust.
One thing: Do Fougerite have function to reload plugin without restart?
https://github.com/Notulp/Fougerite/issues/10Python does. python.reload
The js engines do not have one currently.
C# cannot be reloaded, since Its hard to remove something from the assembly.