Code Monkey home page Code Monkey logo

dayz-scripts's Introduction

dayz-scripts

Custom scripts for DayZ Standalone Server

init.c - Server intialization script for Custom Mission in Server. Should be located under the mission folder.

start.bat - Server startup/control/restart script. Should be in the server root dir, same than the server executable.

serverDZ.cfg - Server general configuration file. Should be located in server root. Needs customization.

If you found these scripts useful, please give a STAR and even FOLLOW the repository to receive upcoming changes and updates!

Init.c features

  • Server side built-in commands using chat
  • Spawning vehicles (few predefined vehicles)
  • Spawning items/weapons/gear/ammo (customizable)
  • Killing players, committing suicide
  • Teleporting from/to coordinates
  • Player listing and stats/details
  • God mode / restore health
  • Admin list read in startup from text file

Getting started

Start off by installing the DayZ Standalone server (e.g. from Steam)

The server installation path depends e.g. on your Steam settings

Once installed, simply copy over the files contained in this repo: start.bat, serverDZ.cfg into the server folder root

(e.g. C:\Program Files (x86)\Steam\steamapps\common\DayZServer)

init.c into the Mission folder

(e.g. C:\Program Files (x86)\Steam\steamapps\common\DayZServer\mpmissions\dayzOffline.chernarusplus)

You might need to override the existing init.c file (or keep it as backup and rename it as init.c.old)

Configure the server by editing the serverDZ.cfg file to your liking (e.g. server name, password player count, ..)

To access chat commands, you need to add the player's Steam64ID (in decimal format) to the admins.txt file. You can find the user's SteamID using any any Steam profile info webpage, e.g. SteamFinder. E.g. steamID64 (Dec): 76561197960287930

Copy the ID(s) over into the admins.txt file. The file is located in the user profile folder (e.g. C:\Users\USERNAME\AppData\Local\DayZ\admins.txt, aka %USERPROFILE%\AppData\Local\DayZ\admins.txt in Windows). Create the file if it does not exist yet (it is automatically created during the first launch of the server, so you should first move on to launch the server at least once before defining the admins, and then restart the server after. Simply insert the IDs into the file, separated by newlines and save the file.

Once finished, launch off the server by running start.bat. A Server GUI log window opens and the server should start in a few moments. Ensure a log message says that the cloud Hive is connected, and forward required server ports to ensure your server will be listed in the public server listing.

Once the server is up and running, test your server by launching DayZ and connecting to your server using the server menu.

Once you are in the game, you can issue chat commands by sending a chat message starting with '/' (e.g. '/help').

Special mentions

Thanks antonioganea, great job with creating a code injector tci to allow dynamic updates in the server code logic and lot faster and more robust development process for the server-side scripting.

dayz-scripts's People

Contributors

sinipelto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dayz-scripts's Issues

NULL pointer error on line 418

if (!player || player.GetHealth("", "") <= 0.0) {

Hello, i've a lot of NULL pointer errors line 418 after using godmod and logoff from server
I think that the code should be modified, you are testing if (!player) on line 417 but doing player.GetUID() on line 418...
I suggest to do a first if(!player) { return; }

Commands are not sent

The admins.txt file is created, but after specifying the ID the commands are not sent to the chat.

Not recognized near other players

The commands work very well and I'm far way from other players, but once get close, the command goes to the in game chat ot the other player and isn't recognized by the script. Do you have any idea how to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.