Jump to content
MakeWebGames

Recommended Posts

Posted

This is my first mod so please be fair with comments.

I created this mod to allow me to set up a decent GTA, User Garage and Races (all of which will come soon) but you can do whatever you want with it.

I know there is already a cars mod out there somewhere but to be honest it didn't suit my needs and was kinda dated I think. This mod is an amendment of the cities inbuild mod.

[mysql]

--

-- Table structure for table `cars`

--

CREATE TABLE IF NOT EXISTS `cars` (

`id` int(11) NOT NULL AUTO_INCREMENT,

`model` text NOT NULL,

`make` text NOT NULL,

`value` int(11) NOT NULL,

`quantity` int(11) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

[/mysql]

Open global_func.php and find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

On a new line above that add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Create a new file named staff_cars.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And there you have it, the starting point for a multitude of new mods.

Please also use this post to make the mod better if you so wish :thumbsup:

Posted

Just added a little more to this mod:

Create a folder named carpics on your file directory.

[mysql]

--

-- Table structure for table `cars`

--

CREATE TABLE IF NOT EXISTS `cars` (

`id` int(11) NOT NULL AUTO_INCREMENT,

`model` text NOT NULL,

`make` text NOT NULL,

`value` int(11) NOT NULL,

`quantity` int(11) NOT NULL,

`carpics` varchar(255) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

[/mysql]

Now using a modified Isomerizer uploadpics.php script create:

uploadcarpics.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

on staff_cars.php go to line 21, create a new line and add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Replace with:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Below add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

In the editcar function (which if you followed me should be line 62) Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Below add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Change line 72 which should be:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

To:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And that should be it - you can now have images for your cars too.

  • 1 year later...
  • 2 weeks 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...