Last active
March 25, 2019 22:25
-
-
Save smokey-edgy/ef23edf264dfcdfb679ceaf2ddd6427a to your computer and use it in GitHub Desktop.
DayZ Modding: Setting a players position upon client ready or connect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modded class MissionServer { | |
void MissionServer() { | |
Print("Mod loaded!"); | |
} | |
override void InvokeOnConnect(PlayerBase player, PlayerIdentity identity) { | |
player.SetPosition(Vector(6560.29, 0, 2462.12)); | |
Print("Player " + identity.GetName() + " spawning at " + player.GetPosition()); | |
super.InvokeOnConnect(player, identity); | |
} | |
override void OnClientReadyEvent(PlayerIdentity identity, PlayerBase player) { | |
player.SetPosition(Vector(6560.29, 0, 2462.12)); | |
Print("Player " + identity.GetName() + " spawning at " + player.GetPosition()); | |
super.OnClientReadyEvent(identity, player); | |
} | |
override void OnClientRespawnEvent(PlayerIdentity identity, PlayerBase player) { | |
player.SetPosition(Vector(6560.29, 0, 2462.12)); | |
Print("Player " + identity.GetName() + " spawning at " + player.GetPosition()); | |
super.OnClientRespawnEvent(identity, player); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment