Code Monkey home page Code Monkey logo

vcmp-livemap's Introduction

Live Map for Vice City Multiplayer

The map uses the data.json file in its web directory, which you have to update from the server, by default every 5 seconds.
You can use the JSON module made by me to make it easy to export the data to JSON.

You can use online services that can parse or validate your JSON data if it is correct. You can find them at the following URLs:

Usage examples:

Example for data.json:

{
    "hostname": "Server name",
    "weather": 4,
    "hour": 10,
    "minute": 30,
    "numplayers": 2,
    "maxplayers": 2,
    "players": [
        {
            "id": 0,
            "name": "Player name",
            "skin": 30,
            "team": 8,
            "hp": 3,
            "ap": 0,
            "score": 6,
            "cash": 0,
            "ping": 83,
            "weapon": 0,
            "vehicle": {
                "model": 230,
                "color": [10, 21],
                "health": 1000
            },
            "pos": {
                "x": -672.98,
                "y": 941.733
            },
            "spectating": null,
            "spawned": true
        },
        {
            "id": 1,
            "name": "Player name",
            "skin": 35,
            "team": 8,
            "hp": 3,
            "ap": 100,
            "score": 6,
            "cash": 1123,
            "ping": 83,
            "weapon": 12,
            "vehicle": null,
            "pos": {
                "x": -672.98,
                "y": 941.733
            },
            "spectating": 0,
            "spawned": false
        }
    ],
    "messages": [
        // join
        {
            "name": "Player name",
            "team": 255,
            "country": "Country name",
            "type": 1
        },
        // part
        {
            "name": "Player name",
            "team": 13,
            "reason": 0,
            "type": 2
        },
        // spawn
        {
            "name": "Player name",
            "team": 13,
            "skin": 1,
            "type": 3
        },
        // chat
        {
            "name": "Player name",
            "team": 255,
            "msg": "Message text",
            "type": 4
        },
        // action
        {
            "name": "Player name",
            "team": 255,
            "msg": "Action text",
            "type": 5
        },
        // death
        {
            "name": "Player name",
            "team": 255,
            "reason": 43,
            "type": 6
        },
        // kill
        {
            "name": "Killer name",
            "team": 255,
            "victim": "Victim name",
            "vteam": 13,
            "reason": 15,
            "bodypart": 2,
            "type": 7
        },
        // teamkill
        {
            "name": "Killer name",
            "team": 13,
            "victim": "Victim name",
            "vteam": 13,
            "reason": 15,
            "bodypart": 2,
            "type": 8
        },
        // teamchat
        {
            "name": "Player name",
            "team": 255,
            "msg": "Message text",
            "type": 9
        },
        // custom
        {
            "msg": "Custom Message text",
            "type": 10
        }
    ]
}

vcmp-livemap's People

Contributors

gudio avatar huncrys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ukrs

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.