Skip to content

Instantly share code, notes, and snippets.

@smokey-edgy
Last active March 25, 2019 22:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save smokey-edgy/ef23edf264dfcdfb679ceaf2ddd6427a to your computer and use it in GitHub Desktop.
Save smokey-edgy/ef23edf264dfcdfb679ceaf2ddd6427a to your computer and use it in GitHub Desktop.
DayZ Modding: Setting a players position upon client ready or connect
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