No time to test, but: https://github.com/dretax/Python-Plugins/tree/master/PlutonPlugins/TpFriend
Doesn't contain the delay yet. Didn't have the time for It yet.
Doesn't contain the delay yet. Didn't have the time for It yet.
playertor = self.CheckV(Player, args)
systemname = ini.GetSetting("Main", "Name")
systemname = ini.GetSetting("Settings", "sysname")
calc = System.Environment.TickCount - time
time = DataStore.Get("tpfriendcooldown", Player.SteamID)
usedtp = DataStore.Get("tpfriendusedtp", Player.SteamID)
# if time is not set in DataStore, you get an error on the next line
calc = System.Environment.TickCount - time
if time == None or calc < 0 or math.isnan(calc):
time = DataStore.Add("tpfriendcooldown", Player.SteamID, System.Environment.TickCount)
usedtp = DataStore.Get("tpfriendusedtp", Player.SteamID)
if DataStore.ContainsKey("tpfriendcooldown", Player.SteamID):
time = DataStore.Get("tpfriendcooldown", Player.SteamID)
else:
time = DataStore.Add("tpfriendcooldown", Player.SteamID, System.Environment.TickCount)
calc = System.Environment.TickCount - time
playerfromm = Server.Find(pending)
playerfromm = Server.FindPlayer(pending)
playerfromm.SafeTeleportTo(Player.Location)
playerfromm.GroundTeleport(Player.Location)
playerfromm.Teleport(Player.Location)
from System import *
import System
Thanks for the list thox atleast I dont have to find them myself xDAnd finally:
toPython:playerfromm = Server.Find(pending)
x2Python:playerfromm = Server.FindPlayer(pending)
toPython:playerfromm.SafeTeleportTo(Player.Location)
orPython:playerfromm.GroundTeleport(Player.Location)
Also, and I have no clue why, just test and error, changing:Python:playerfromm.Teleport(Player.Location)
toPython:from System import *
removed some errors.. with all those modification (and from my limited tests), it works great. I haven't tested names with spaces or special character etc.Python:import System
Safe Teleport remained in from the conversion.And finally:
toPython:playerfromm = Server.Find(pending)
x2Python:playerfromm = Server.FindPlayer(pending)
toPython:playerfromm.SafeTeleportTo(Player.Location)
orPython:playerfromm.GroundTeleport(Player.Location)
Also, and I have no clue why, just test and error, changing:Python:playerfromm.Teleport(Player.Location)
toPython:from System import *
removed some errors.. with all those modification (and from my limited tests), it works great. I haven't tested names with spaces or special character etc.Python:import System
usedtp = DataStore.Get("tpfriendusedtp", Player.SteamID)
if DataStore.ContainsKey("tpfriendcooldown", Player.SteamID):
time = DataStore.Get("tpfriendcooldown", Player.SteamID)
systick = System.Environment.TickCount
usedtp = DataStore.Get("tpfriendusedtp", Player.SteamID)
if time is None or (systick - time) < 0 or math.isnan(systick - time):
time = DataStore.Add("tpfriendcooldown", Player.SteamID, systick)
calc = systick - time