Coder Social home page Coder Social logo

christopherday / gangster-legends-v2 Goto Github PK

View Code? Open in Web Editor NEW
66.0 17.0 44.0 2.52 MB

A free to use text-based PBBG / MMORPG script

Home Page: http://glscript.net

License: MIT License

PHP 96.74% CSS 2.19% HTML 0.01% JavaScript 1.06%
sql php mmorpg-script game game-engine game-development website web-game

gangster-legends-v2's Introduction

Gangster-Legends-V2

Gangster Legends v2 is a open source PBBG game engine written in PHP using a MySQL backend.

Requirements

  • PHP 5.6.X or higher
  • MySQL 5.5 or higher

How to install

  1. Extract files to your webserver
  2. Navigate to GL v2 on your server in a web browser i.e. http://127.0.0.1/Gangster-Legends-V2
  3. Follow instructions

How To Manualy Install

  1. Extract files to your webserver
  2. Create a new database and a user
  3. Import install/schema.sql and install/data.sql to your MySQL Database
  4. Open up dbconn.php and alter the connection string with your MySQL username, password and database name
  5. The game should now be made with some sample data
  6. Register a new user account
  7. Open up phpMyAdmin and go to the users table and edit the U_userLevel from 1 to 2

Example

A demo can be found at http://demo.glscript.net/

After registering you will become an admin automatically, this is only on the demo site.

gangster-legends-v2's People

Contributors

agscs avatar christopherday avatar kylemassacre avatar marktopper avatar mrdjk avatar reashetyrr avatar tbone99 avatar urb4nz 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gangster-legends-v2's Issues

Admin Panel

I'm not exactly sure how I can access an administration panel on my site? I've finished all the steps and it says you've programmed a new admin panel. How would one access this?

Login issue

It has all been set up and seems to atleast be properly connected to my DB. I have tried to login as admin numerous times, but I cannot get that part to work. It only says I've entered the wrong password. I have gone into my DB, under the "users" table and copy-pasted the username and password but to no awail.
Is there something specific I'm missing? And are there any logs I can have a look at somewhere?

Minor error

Getting a lot of these:
["E_RECOVERABLE_ERROR","Undefined index: CSFR","\/var\/www\/html\/class\/pageElement.php",81,"2021-05-03 17:25:50"]

Undefined ID

There is multiple bugs in the game with travel and crimes that doesn't check if id exists

crimes.inc.php after line 61 add

if (!$crimeInfo){ header("Location:?page=crimes"); exit; }

and same for travel.inc.php add this after line 57

if (!$location){ header("Location:?page=travel"); exit; }

Grammar error in contructModule()

In the constructModule() function in the modules/installed/policeChase.php file has a grammar error in the "text" key of the $crimeError array - it should be can't or cannot
$crimeError = array( "text"=>'You cant attempt another police chase until your timer is up!',

error in the new profile revamp

in the new profile revamp i found an error The comit.
When you preview the profile of other players you see an empty edit profile link i solved that by adding a condition in the list {#if url}{/if}
something like this:
{#each profileLinks} {#if url}<li><a href="{url}">{text}</a></li>{/if} {/each}

Warning: Division by zero

I am getting an error:

Warning: Division by zero in /home/xxx/xxx/class/user.php on line 236

This is using the latest master from GitHub

Custom Language Files (Idea)

I find it a good idea to invite separate language files to invite texts.

for example

<TH> NAME </ th>
<th style = "width: 100px"> Injury </ th>
<th style = "width: 100px"> Value </ th>
<th style = "width: 150px"> Location </ th>
<th style = "width: 160px"> Links </ th>

instead of

$ langfile = array (
"NAME" => "Here is the text", // "sample");
"iNJURY" => "Here is the text", // "sample");
"VALUE" => "Here is the text", // "sample");

and say there would be a language folder where there would be a garage.php file whose content

define ("NAME", "Name");
define ("INJURY", "Injury");
define ("VALUE", "Value");

?>

From the language file you have been called to get the garage php file for all the text.

rank percent

need to add {#unless maxRank}({exp_perc}%){/unless} to logedin.php

Error 500

Getting error 500 on Jail and few other pages debug error now displays:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'mobdon_g4m3.userStats.US_rank' which is not in SELECT list; this is incompatible with DISTINCT' in /home/mobdon/public_html/modules/installed/jail/jail.inc.php:59 Stack trace: #0 /home/mobdon/public_html/modules/installed/jail/jail.inc.php(59): PDOStatement->execute() #1 /home/mobdon/public_html/modules/installed/jail/jail.inc.php(154): jail->getJailUsers() #2 /home/mobdon/public_html/class/module.php(29): jail->constructModule() #3 /home/mobdon/public_html/class/page.php(86): module->__construct() #4 /home/mobdon/public_html/class/page.php(35): page->load('jail') #5 /home/mobdon/public_html/init.php(61): page->loadPage('jail') #6 /home/mobdon/public_html/index.php(4): require('/home/mobdon/pu...') #7 {main} thrown in /home/mobdon/public_html/modules/installed/jail/jail.inc.php on line 59

HTTP ERROR 500

Hi,
I followed the instructions for install, but everytime I try to go into my website it says that:
This page isn’t working
mywebsite is currently unable to handle this request.
HTTP ERROR 500

What did I do wrong?

footer page

Is it possible to make a footer at the bottom of the site?

Issues on install

Parse error: syntax error, unexpected 'if' (T_IF), expecting identifier (T_STRING) in C:\xampp\htdocs\class\templateRender.php on line 29

I followed all instructions to install and this is the error that is presented to me.

Error with Handlebars in usePoints

Found an error in usePoints page regarding Handlebars:

There was an error! File: /home/galactic/public_html/class/Handlebars/Template.php Line: 395 Error: number_format() expects parameter 1 to be float, string given Type: E_RECOVERABLE_ERROR

User info not updating

When you commit a crime or commit a theft, the money and exp does not update until you refresh the page, or navigate to a new page.

These should update instantly.

Detective not hiring

I've set the cost of the detectives to 1000 and hours to 1, but no matter the values I set it always returns error:

Untitled

Forget Password

SO I have errors where the Header is missing a From field going to my test email for @gmail.com If I test using my own domain it works. The only trouble is that since its missing the from email in settings it uses the server name instead which I'd prefer not to use.

Undefined Action causes game to break.

if an action on any page is undefined it breaks the whole game layout. the problem is with the method_exists when loading the action, if its undefined it returns nothing and if you change to return a 404 page. admin modules no longer work as this runs on a different loader to the main files.

Garage error demo site

Notice: Trying to get property of non-object in /srv/http/glscript.net/www/demo/modules/installed/garage/garage.inc.php on line 28

Notice: Trying to get property of non-object in /srv/http/glscript.net/www/demo/modules/installed/garage/garage.inc.php on line 31

Login module.

Hello!

Not possible to log in, password do not match ..
I am sure, i use the correct password ..

Characters encoding errors v2.1

If I'm translating some pages in Hungarian into characters encoding errors. For example, the Crimes menu
Character encoding of database and tables utf-8. I checked and the files got such a character encoding utf-8
encoding

Bounties - Killed user error

When someone is killed who has a bounty on them, they bounty is not removed/claimed after they die.

E.g.

  • John Smith is on the Bounty list for $999

  • I go and kill John Smith

  • John Smith stays on the bounty list.

Install Server

No matter what i try i cant get it to install on my server.

Admin - Adding a new rank

Thank you for fixing the Register issue, just thought that I would play about with the game and have found out when I attempt to Add a new Rank in the admin control panel, it goes to a blank page when I attempt to submit it.

Also, as a request, is there a way we could get a Forgot Password link to allow people to reset their password?

Logout issues

There was an error!
File: /class/page.php
Line: 251
Error: Cannot modify header information - headers already sent by (output started at /themes/default/loggedin.php:1)
Type: E_ALL

Fatal error: Uncaught Error: Class 'Round' not found

Fatal error: Uncaught Error: Class 'Round' not found in /var/www/html/Gangster-Legends-V2/class/user.php:166 Stack trace: #0 /var/www/html/Gangster-Legends-V2/install/step/3.php(25): user->makeUser('user1', '[email protected]', 'password') #1 /var/www/html/Gangster-Legends-V2/install/index.php(68): include('/var/www/html/G...') #2 {main} thrown in /var/www/html/Gangster-Legends-V2/class/user.php on line 166

In 3 step i get this fatal error. Any ideas ?

Class file name changes

Is it intentional that file names have changed? hooks/hook templateRender/template? Did I miss the documentation for these?

Gangs are not working

After clicking on gang 404 Page Not Found module loads, also there is blank menu "Gangs". Is this feature planned to be added/fixed or it is removed?

Ideas to add

I had ideas to add for the script,

  • Add a system for when a person has been killed to recover their money

  • Add a sales system for cars with members because they are in the game but they are useless by selling them in the game

  • Add a system to request to join a gang because you have to invite the person with his nickname

  • Add more rank for gangs

If I have other additions I will give my ideas

xampp no ​​login possible

Can I use the browser game with xampp? which version do I need? (Please link) if I log in then do not load the page please help me my english is bad (google translator)

User Login Check

i have noticed that pages like Login, Register, Forgot Password are still accessible to users even if they are loggedin i would recommend maybe adding
if(isset($this->user->loggedin)){ header("Location:?page=" . $this->page->landingPage); exit; }
in each of the construct functions to make sure it is checked.

module class

include the module class in inti.php not page.php

Error after install regarding nbbc.php

After a fresh install of GL 2.4.1 I am getting the following error:

There was an error! File: /home/galactic/public_html/class/nbbc.php Line: 155 Error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /home/galactic/public_html/class/nbbc.php:155 Stack trace: #0 /home/galactic/public_html/class/nbbc.php(1953): BBCodeLexer->NextToken() #1 /home/galactic/public_html/class/pageElement.php(56): BBCode->Parse('GL v2 successfu...') #2 /home/galactic/public_html/class/pageElement.php(69): pageElement->convertBBCodeToHTML('GL v2 successfu...') #3 [internal function]: pageElement->{closure}(Object(Handlebars\Template), Object(Handlebars\Context), 'text', '') #4 /home/galactic/public_html/class/Handlebars/Template.php(255): call_user_func_array(Object(Closure), Array) #5 /home/galactic/public_html/class/Handlebars/Template.php(148): Handlebars\Template->section(Object(Handlebars\Context), Array) #6 /home/galactic/public_html/class/Handlebars/Helpers.php(298): Handlebars\Template->render(Object(Handlebars\Context)) #7 [internal function]: Handlebars\Helpers->helperEach(Object(Handlebars\Template), Object(Handlebars\Context), 'news', '\n ...') #8 /home/galactic/public_html/class/Handlebars/Template.php(255): call_user_func_array(Array, Array) #9 /home/galactic/public_html/class/Handlebars/Template.php(148): Handlebars\Template->section(Object(Handlebars\Context), Array) #10 /home/galactic/public_html/class/Handlebars/Handlebars.php(180): Handlebars\Template->render(Object(Handlebars\Context)) #11 /home/galactic/public_html/class/pageElement.php(91): Handlebars\Handlebars->render('\n\n <...', Array) #12 /home/galactic/public_html/class/pageElement.php(141): pageElement->templateToHTML('\n\n <...', Array) #13 /home/galactic/public_html/class/page.php(346): pageElement->parse() #14 /home/galactic/public_html/modules/installed/loggedin/loggedin.inc.php(31): page->buildElement('newsArticle', Array) #15 /home/galactic/public_html/class/module.php(30): loggedin->constructModule() #16 /home/galactic/public_html/class/page.php(144): module->__construct() #17 /home/galactic/public_html/class/page.php(58): page->load('loggedin') #18 /home/galactic/public_html/init.php(86): page->loadPage('loggedin') #19 /home/galactic/public_html/index.php(5): require('/home/galactic/...') #20 {main} thrown Type: E_RECOVERABLE_ERROR

leaderboards error

New install Leaderboards menu error message

Notice: Undefined property: stdClass::$U_name in E:\local\bin\htdocs\modules\installed\leaderboards\leaderboards.inc.php on line 34

Notice: Undefined property: stdClass::$U_id in E:\local\bin\htdocs\modules\installed\leaderboards\leaderboards.inc.php on line 35

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.