SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 19/05/2019, 04:50 AM   #1
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,685
Reputation: 485
Default Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Jake's Vehicle System (MySQL R41-4)


Hey! I am back with another release, and this time it's a vehicle system. It uses MySQL to save the data created by the player. The script is basically a vehicle system but built for Stunt/Freeroam Servers. The players can spawn any vehicles they want and those spawned vehicles get saved (including the modifications/tuning made in the vehicle) The only difference of this vehicle system from any other vehicle system out there is that it doesn't save position or you do not need to park it. You can just simply leave it where it was then you can call/spawn the vehicle with a command. You could also modify the plate of the vehicle (and it supports HEX code, putting a color into your numberplates!) The players can own up to 10 vehicles (changeable)


I would also like to thank my friend Jacob Black for helping me up beta testing this script on my free server-host, also thanks to sa-mp.me for providing me a free server-host (+ Free MySQL server with 25MB of storage)


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

COMMANDS




The colored texts are for RCON admins.


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SCREENSHOTS







>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

DOWNLOAD


Solidfiles
Accepting mirrors, just PM me or post it down below


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SETTING UP THE MYSQL DATABASE

The system is running on a MYSQL server, In order to setup the system you are required to at least learn the basic sets on setting up a MySQL server on your localhost (downloading XAMPP/WAMP, your own preference) A tutorial on how to setup a MySQL server on your localhost can be found here (Credits to RIDE2DAY)

First of all, Head over to your phpMyAdmin localhost (or if you are running a live-server, to your server-host's phpMyAdmin).

You would then need to create a database name "vehiclesys", once created make sure that you have selected or opened the database.

Export the files from vehicles.rar into your server's root folder.

Head over to import and select the vehicles.sql (Click Choose File and locate the vehicles.sql)

Hit "Go" and it should import the table "vehicles" into your database.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SETTING UP THE SCRIPT TO THE SERVER

Once you have export the files to your server's root folder, There should be a vehicle.pwn in your filterscript folder. The required includes and plugins should be inside your server's folder.

Open vehicle.pwn and recompile the script (Press F5)

Head over to server.cfg and open it

Make sure over the filterscript line that vehicle is included

Edit the plugins line and make sure that it includes the following include: mysql sscanf streamer or mysql.so sscanf.so stramer.so (Linux)

Once you have done those steps, you are good to go to run the server with the script running.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

CONS

  • The Side Kirts doesn't save.
  • When changing number-plates, the vehicle gets respawned back to where it was originally spawned (if already spawned by the owner by the time they changed the plate, This can be a little bit annoying to the driver of the vehicle/passenger)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

BUGS

None.

If you have found one, please make sure to PM me or post down below.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
__________________


making a comeback soon
JaKe Elite is offline   Reply With Quote
Old 19/05/2019, 05:11 AM   #2
SonnyGamer
Huge Clucker
 
SonnyGamer's Avatar
 
Join Date: Jun 2017
Location: Italy
Posts: 306
Reputation: 81
Default Re: Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Another great job Jakobs!
SonnyGamer is offline   Reply With Quote
Old 19/05/2019, 12:08 PM   #3
KeyOfKey
Big Clucker
 
KeyOfKey's Avatar
 
Join Date: Apr 2019
Posts: 152
Reputation: 7
Default Re: Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Are admins allowed to create vehicles and put them for sale?
KeyOfKey is offline   Reply With Quote
Old 19/05/2019, 12:30 PM   #4
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,685
Reputation: 485
Default Re: Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Quote:
Originally Posted by KeyOfKey View Post
Are admins allowed to create vehicles and put them for sale?
Nope. The admins can only remove the player's vehicle(s). This vehicle system is built for Stunt/Freeroam servers and is not intended to be used in a Roleplay Server.
__________________


making a comeback soon
JaKe Elite is offline   Reply With Quote
Old 19/05/2019, 12:57 PM   #5
KeyOfKey
Big Clucker
 
KeyOfKey's Avatar
 
Join Date: Apr 2019
Posts: 152
Reputation: 7
Default Re: Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Oh ok thanks.

pawn Code:
stock IsVehicleOwner(playerid, vid)
{
    foreach(new vid : ServerVehicles)
    {
        if(!strcmp(vInfo[vid][v_Owner], ReturnPlayerName(playerid), true)) return 1;
    }
    return 0;
}

Is it correct?
KeyOfKey is offline   Reply With Quote
Old 19/05/2019, 01:23 PM   #6
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,685
Reputation: 485
Default Re: Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Quote:
Originally Posted by KeyOfKey View Post
Oh ok thanks.

pawn Code:
stock IsVehicleOwner(playerid, vid)
{
    foreach(new vid : ServerVehicles)
    {
        if(!strcmp(vInfo[vid][v_Owner], ReturnPlayerName(playerid), true)) return 1;
    }
    return 0;
}

Is it correct?
Did you change the Iterator name of the script from JakVehicles to ServerVehicles?

And no I don't think it's correct you could have done something like this.

pawn Code:
stock IsVehicleOwner(playerid, vid)
{
    foreach(new idx : ServerVehicles)
    {
        if(idx == vid) {
            if(!strcmp(vInfo[idx][v_Owner], ReturnPlayerName(playerid), true)) return 1;
        }
    }
    return 0;
}
__________________


making a comeback soon
JaKe Elite is offline   Reply With Quote
Old 20/05/2019, 02:27 PM   #7
KeyOfKey
Big Clucker
 
KeyOfKey's Avatar
 
Join Date: Apr 2019
Posts: 152
Reputation: 7
Default Re: Jake's Vehicle System [for Stunt/Freeroam server] (MySQL R41-4)

Thanks. But what vAssignedCar stands for? For what is used?
KeyOfKey is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Unleashed Stunt Freeroam - Stunt/Freeroam/DM/Fun - MySQL SyntaxQ Gamemode Scripts 144 17/01/2018 09:36 AM
[GameMode] Project Innovative 2.0 [MySQL/PCP/IRC/DM/STUNT/FREEROAM] Affan Gamemode Scripts 11 26/06/2016 07:25 PM
Script Problem - JaKe's Stunt/DM/... flashcraft705 Client Support 14 08/04/2016 05:00 PM
[Tutorial] How to make car spawning system [Good for Stunt/Freeroam] lamarr007 Tutorials 3 23/02/2014 04:15 AM


All times are GMT. The time now is 01:22 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.