GithubHelp home page GithubHelp logo

mafia-game-script's Introduction

Mafia-Game-Script

Upload script folder to your web server.

Copy the files from script folder to the directory you want the game to be in (should be in a root directory).

If on a Unix server, change permissions on the game directory and files to 777. (You can change file permission after completing installation)

Navigate to http://your_website_/install.php (can be installed on subdomain aswell). Follow the instruction and complete the installation.

Copy Down the Cron Info from the installation page.

Login as administrator and Change the settings to your likings.

Setting Up Cron

Go to your control panel and if it’s a Cpanel, log in and scroll down the first page that you come to and click on the “Cron Jobs” link. Choose “Advanced Unix Style.” From there you need to set up cron jobs for the 4 cron files located on your server.The cron info is generated from the installation complete page .

Eg:

*/5 * * * * curl http://yousite.com/cron_run_five.php

0 * * * * curl http://yousite.com/cron_run_hour.php

0 0 * * * curl http://yousite.com/cron_run_day.php

The values that you should put in each box are seperated by spaces, eg put all the text before the first space in the Minute box, then Hour, then Day, then Month, then Weekday, then finally Command. You will have to Commit Changes and select Advanced (Unix Style) after entering each one to make a new box appear for the next one. (If no cPanel and on a linux server with shell access, use the cron program to import these crons manually. If no cPanel and no linux with shell, you're a bit screwed and should consider changing servers)

Time based things will work only if the cron jobs has properly set up .

Time based things depends upon cron-jobs such as recovery time , jail function etc ,energy refill etc .

Jail and Hospital - every 1 minute

Users stats such as enery , health refill - every 5 minutes

If you want to refill enery and stats every minutes , do as * * * * * curl http://yousite.com/cron_run_fivemins.php and similarly.

Please note if you have many players its recommend to change the hosting to dedicated server as cron uses extreme resources.

Steps for creating a MySQL Databases with cPanel:

  1. Click on the MySQL Databases icon in cPanel.

  2. Then, you'll need to create a database and choose a name.

  • Click Create Database
    • Click go back
  1. Next, you create a username and password for the database.
    • Create User
    • Click go back
  2. Last, you'll want to add the new user to the database.
    • Click Add User To Database with full permissions
    • Click go back

mafia-game-script's People

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.