Jump to content
MakeWebGames

[RELEASE] MafiaCore


Guest

Recommended Posts

Morning // Afternoon // Evening all

I have now decided to release this to the public after almost a year of keeping it to myself it might teach someone or give someone ideas.

The code behind version 1 is more than ugly, it is vile and not recommended to be used in a production enviroment, this was when I first wrote something on my own.

Images are copyright to probably some random guy on Google

Features

  • Updates - Add/delete
  • FAQ
  • Buy Credits - Paypal only
  • Use credis
  • Edit Profile
  • Find player - Dead // Alive // Both
  • Game stats - User stats // Money stats
  • Users online - Legend (Moderators, Admin, Ops) - 5 min, 10 min, 60 min and 24 hours
  • Top 25 - Busts and XP
  • Properties - Hospital, Airport, Gun shop, Armor Shop, Bullet Factory - 5 different countries
  • Forum - New thread, reply, stick/lock toggle on topics
  • Inbox - Delete // Block users // Send message
  • Notepad
  • Helpdesk
  • Helpdesk CP
  • Crimes
  • Image captcha
  • Jail - Add bots
  • Missions - Partly, only done Mondays daily
  • Organised Crime
  • Fly - Countries - America, Africa, Canada, England, Russia
  • Hospital
  • Double or Nothing
  • User profiles - Can Ban, clear profile, force script check, Revive, Derank, Promote - Username // Status // Rank // Wealth // Last at // Crew // Gender // Kill Rank // Jail Rank // Credits

 

MafiaCore V3 will come in the future, when in the future that is I have no idea, in the mean time feel free to follow me on twitter but for now the download link is below

Download Here

Read all about it

Current list of thanks

 

  • Sam T - Awesome guy, awesome friend, stayed up extremely late drinking and coding keeping me motivated
  • Charl - For keeping Sam interested and taking part in MC
  • Joshua F - Starting me up with PHP
  • T4GZz - Being a moderator
  • Luke/Pig - Helping maintain the game
  • All the other players, there are way too many to mention however I thank you all for playing and participating

 

Remember to follow me on twitter to get the latest updates for the next release!

Regards - Exze // !Angel

Install instructions

Upload files to your host, fill in the database details in inc/func.php and credits/ipn.php
Import mcv1.sql into your database
Create an account /register.mc
Change userlevel to 2 in the database under the table "users"

 

As mentioned above the code is procedural and a mess however it was one of my first ever projects, a huge motivator and I have improved a thousand fold from doing it. This was created back in 2011/2012.

Minimul support will be given unless for some crazy reason a ton of people decide to use it and improve it, then I will gladly give the amount of support needed.

- !Angel

Edited by Guest
Link to comment
Share on other sites

function pS($string){
   $string = mysql_real_escape_string($string);
   $string = htmlspecialchars($string);
   //$string = str_replace("<", "<", $string);
   //$string = str_replace(">", ">", $string);
   //$string = strip_tags($string);
   $string = stripslashes($string);
   return $string;    
}

 

Ok that's your "security" function. Yet... you know that new PHP installation don't add slashes? Also, removing the slashes AFTER escaping the string is not smart... So you should check first if the PHP installation requires you to remove the slashes, and if it's needed remove them, then escape the string.

Also, replacing special HTML characters is not really something I would do all the time. But that's personal opinion.

error_reporting(0); at the first line of the include you do all the time? Seriously? Why? No configuration file? You need to edit the func.php file to modify the DB and timezone?

Rewriting all the URL from .php to .mc? Is that useful?

There is more to it, but I shall stop. It's good to see somebody doing its homework and creating something from scratch => and learning from it. However be careful, I'm far from confident from the script, and I would not use it as basis for any game.

Anyhow congratz for your work ;)

Link to comment
Share on other sites

function pS($string){
   $string = mysql_real_escape_string($string);
   $string = htmlspecialchars($string);
   //$string = str_replace("<", "<", $string);
   //$string = str_replace(">", ">", $string);
   //$string = strip_tags($string);
   $string = stripslashes($string);
   return $string;    
}

 

Ok that's your "security" function. Yet... you know that new PHP installation don't add slashes? Also, removing the slashes AFTER escaping the string is not smart... So you should check first if the PHP installation requires you to remove the slashes, and if it's needed remove them, then escape the string.

Also, replacing special HTML characters is not really something I would do all the time. But that's personal opinion.

error_reporting(0); at the first line of the include you do all the time? Seriously? Why? No configuration file? You need to edit the func.php file to modify the DB and timezone?

Rewriting all the URL from .php to .mc? Is that useful?

There is more to it, but I shall stop. It's good to see somebody doing its homework and creating something from scratch => and learning from it. However be careful, I'm far from confident from the script, and I would not use it as basis for any game.

Anyhow congratz for your work ;)

If you read the thread you would know not to use this for production. On top of that I mentioned multiple times the code sucks in general. Error reporting was used at the time for a reason I do not know. Turn on strict and the whole thing will collapse, I rewrote the URL's because the game is MafiaCore therefore I thought .mc was fitting at the time.

I too can write a list probably a thousand lines long about errors, bugs and things it needs. This is purely to learn from (Maybe there is something in there, an algorithm or a feature) or tear apart and build upon.

Link to comment
Share on other sites

Doesn't look bad at all if I'm honest. Good job mate. :)

Cheers, on a side note, this uses mysql which is as you know depreciated, on top of that this is prone to sql injections.

Link to comment
Share on other sites

Made me cringe and cry!

Good job releasing it, hopefully someone will make good use of it!

Yeh, I expected nothing less, the ideas there might help someone though. I might even release V2 when V3 is released depending on the feedback. V2 is still pretty meh, early in my career though it's a huge jump on this.

Link to comment
Share on other sites

i remember seeing this game when it was released and offered a hand if you needed any help, but i was told by a game admin i was not good enough.. but after seeing the code i'm glad i never helped!

By your attitude i'm also glad you didn't help :)

Link to comment
Share on other sites

i only have a attitude to people who think they are better then eveyone else.. and by the reply it seems they had more of a attitude

I wanted to work on it alone at that point, and to be honest I work better on projects like that alone or with Dave, maybe the reply may have seemed harsh at the time but anyone with common sense as an admin would have said no to some random guy asking to help.

Link to comment
Share on other sites

I wanted to work on it alone at that point, and to be honest I work better on projects like that alone or with Dave, maybe the reply may have seemed harsh at the time but anyone with common sense as an admin would have said no to some random guy asking to help.

Awh, I like working with you to! :o

Be nice to my Angel or feel his wrath!

Edited by Dave Macaulay
Link to comment
Share on other sites

I'm with !Angel on this one. I prefer to work alone on most projects and very few people can come in on my work, so someone that I don't know would have no chance of joining in on my work.

Somebody sounds a little bitter, to be honest.

Link to comment
Share on other sites

function pS($string){
   $string = mysql_real_escape_string($string);
   $string = htmlspecialchars($string);
   //$string = str_replace("<", "<", $string);
   //$string = str_replace(">", ">", $string);
   //$string = strip_tags($string);
   $string = stripslashes($string);
   return $string;    
}

 

Ok that's your "security" function. Yet... you know that new PHP installation don't add slashes? Also, removing the slashes AFTER escaping the string is not smart... So you should check first if the PHP installation requires you to remove the slashes, and if it's needed remove them, then escape the string.

Also, replacing special HTML characters is not really something I would do all the time. But that's personal opinion.

error_reporting(0); at the first line of the include you do all the time? Seriously? Why? No configuration file? You need to edit the func.php file to modify the DB and timezone?

Rewriting all the URL from .php to .mc? Is that useful?

There is more to it, but I shall stop. It's good to see somebody doing its homework and creating something from scratch => and learning from it. However be careful, I'm far from confident from the script, and I would not use it as basis for any game.

Anyhow congratz for your work ;)

pointless we have to think how to grow this community instead of teasing anybody

Link to comment
Share on other sites

pointless we have to think how to grow this community instead of teasing anybody

They're all valid helpful comments in my opinion.

You mean 'wrath', right? :D

Dunno what you're on about... original post says 'wrath' (Ignore that it was recently edited....)

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...