I want a plugin that will teleport you to a specific location made in C# for Rust, I already tried SpawnDatabase with Custom Spawn Locations and it doesn't work so I tried to do one and it doesn't work I get "NetworkData.Write - no handler to write System.Object[] -> System.Object[]"
My code:
Code:using System.Collections.Generic; using Newtonsoft.Json; using Oxide.Core.Plugins; using UnityEngine; using Oxide.Core;namespace Oxide.Plugins { [Info("Main","Kicer", "1.0")] class Main : RustPlugin{ void OnPlayerRespawned(BasePlayer player) { SendReply(player, "You were teleported to the spawn!"); player.ClientRPCPlayer(null, player, "ForcePositionTo", new object[]{ -328.3812, 0.0297963, 15.31828 }); } } }
Solved Teleport to a location on join/respawn?
Discussion in 'Rust Development' started by Kicer, Oct 29, 2017.
-
I think it's better to use
Code:Vector3 pos = new Vector3(100, 20, 100); player.Teleport(pos);
-
Wulf Community Admin
Have you looked at the WelcomeTP plugin?
-
Thanks I will try it now.
[DOUBLEPOST=1509236764][/DOUBLEPOST]Nope, still doesn't work, I don't think it's because I'm an admin and the permissions were set correctly and I configured the spawnpoint correctly too, but the problem is that I want a plugin that will teleport you there every time you died, reconnected or connected to the server.
Finally, based on that plugin I will try to do my own, thanks for the fast response.Last edited by a moderator: Oct 29, 2017 -
-