SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 31/12/2016, 01:21 PM   #1
oMa37
High-roller
 
oMa37's Avatar
 
Join Date: Feb 2016
Posts: 1,011
Reputation: 155
Default Dynamic Vehicle Ownership System [MySQL/Foreach]

took me time thinking to release this system or not ...

Commands:

Player Commands:
  • /buyvehicle <VehicleID> - Buy the offered vehicle in the dealership.
  • /vehicles - Shows the current player owned vehicles, Click on the vehicle to spawn/change plate/empty/etc.
  • /changeplate <Number/Text> - Change the number plate of the vehicle.
  • /lock <VehicleID> - Lock a vehicle (If you are inside the vehicle, No need for the 'VehicleID' parameter).
  • /unlock <VehicleID> - Unlock a vehicle (If you are inside the vehicle, No need for the 'VehicleID' parameter).

Administrator Commands:
  • /buyvehicle <VehicleID> - Buy the offered vehicle in the dealership.
  • /createvehicle <ModelID/Vehicle Name> <Color1> <Color2> <Price> - Create a vehicle for the dealership.
  • /gotovehicle <VehicleID> - Teleport to a vehicle.
  • /setvehicleprice <Price> - Change dealership vehicle price.
  • /deletevehicle <VehicleID> - Delete a vehicle.

Requirements:

Streamer - Incognito
MySQL - BlueG/maddinat0r
Foreach - Kar/Y_Less
SSCANF2 - Y_Less/maddinat0r/Emmet_
Command Processor - SickAttack

Bugs:

Nothing found yet, If you found please post here.

Download:

ClickHere! - GitHub

Special Thanks:

AndySedeyn; Improvements and some fixes.
Konstantinos; Improvements and some fixes.

Enjoy, Hope you like it.

Last edited by oMa37; 01/01/2017 at 01:29 PM.
oMa37 is offline   Reply With Quote
Old 31/12/2016, 02:18 PM   #2
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 2,001
Reputation: 473
Default Re: Vehicle Ownership System [MySQL]

Nice one
SyS is offline   Reply With Quote
Old 31/12/2016, 02:22 PM   #3
Logic_
High-roller
 
Logic_'s Avatar
 
Join Date: Jun 2015
Location: 666
Posts: 1,490
Reputation: 268
Default Re: Vehicle Ownership System [MySQL]

'oly fu' dude - can't rep :3
__________________
Premium quality and reasonable pricing game Server hosting
Logic_ is offline   Reply With Quote
Old 31/12/2016, 02:25 PM   #4
DarkChildren
Gangsta
 
DarkChildren's Avatar
 
Join Date: Oct 2009
Location: Espaņa
Posts: 684
Reputation: 9
Default Respuesta: Vehicle Ownership System [MySQL]

Great!
__________________
Aprende a ser tu mismo
DarkChildren is offline   Reply With Quote
Old 31/12/2016, 02:50 PM   #5
RyderX
Banned
 
Join Date: Oct 2016
Location: Lebanon,Beirut Rank: SA-MP Scripter
Posts: 593
Reputation: 53
Default Re: Vehicle Ownership System [MySQL]

i like it thanks
RyderX is offline   Reply With Quote
Old 31/12/2016, 02:59 PM   #6
Eoussama
High-roller
 
Eoussama's Avatar
 
Join Date: Jul 2016
Location: Kingdom of Morocco // Tangier
Posts: 1,275
Reputation: 255
Default Re: Vehicle Ownership System [MySQL]

noice
__________________

|===[Web taxi]===|
List of my work
Github
Pastebin

|===[Interesting topics]===|
Semantic Versioning


Eoussama is offline   Reply With Quote
Old 31/12/2016, 03:04 PM   #7
iLearner
Guest
 
Posts: n/a
Default Re: Vehicle Ownership System [MySQL]

So you've listened to my suggestion... good job tho!
  Reply With Quote
Old 31/12/2016, 03:32 PM   #8
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,981
Reputation: 1392
Default Re: Vehicle Ownership System [MySQL]

I know it might be easier to re-upload the .pwn file again but pushing commits will be better for reviewing the changes.

The filterscript is nice and I know you will eventually change few other things to improve it so I always appreciate you take into consideration most of my suggestions!

PS: Another version for R40+ would be good as well.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 31/12/2016, 03:35 PM   #9
Thanks
Huge Clucker
 
Join Date: Nov 2016
Posts: 283
Reputation: 0
Default Re: Vehicle Ownership System [MySQL]

How to Do it? i mean how to instill it to mySQL I Already have mysql datebase
Thanks is offline   Reply With Quote
Old 31/12/2016, 03:39 PM   #10
ISmokezU
Gangsta
 
Join Date: Aug 2016
Posts: 575
Reputation: 73
Default Re: Vehicle Ownership System [MySQL]

Hey, isn't this a bad thing to do According to: (http://forum.sa-mp.com/showthread.php?t=420363)

Code:
     new query[500];
    mysql_format(mysql, query, sizeof(query), "UPDATE `Vehicles` SET `vehName` = '%e', `vehOwner` = '%e', `vehLock` = %i, `vehModel` = %i,\
    `vehPlate` = '%e', `vehMod_1` = %i, `vehMod_2` = %i, `vehMod_3` = %i, `vehMod_4` = %i, `vehMod_5` = %i, `vehMod_6` = %i, `vehMod_7` = %i,\
    `vehMod_8` = %i, `vehMod_9` = %i, `vehMod_10` = %i, `vehMod_11` = %i, `vehMod_12` = %i, `vehMod_13` = %i, `vehMod_14` = %i, `vehColorOne` = %i,\
    `vehColorTwo` = %i, `vehX` = %f, `vehY` = %f, `vehZ` = %f, `vehA` = %f WHERE `vehID` = %d", vInfo[vehicleid][vehName], vInfo[vehicleid][vehOwner],
    vInfo[vehicleid][vehLock], vInfo[vehicleid][vehModel], vInfo[vehicleid][vehPlate], vInfo[vehicleid][vehMod][0], vInfo[vehicleid][vehMod][1], vInfo[vehicleid][vehMod][2], 
    vInfo[vehicleid][vehMod][3], vInfo[vehicleid][vehMod][4], vInfo[vehicleid][vehMod][5], vInfo[vehicleid][vehMod][6], vInfo[vehicleid][vehMod][7], vInfo[vehicleid][vehMod][8], 
    vInfo[vehicleid][vehMod][9], vInfo[vehicleid][vehMod][10], vInfo[vehicleid][vehMod][11], vInfo[vehicleid][vehMod][12], vInfo[vehicleid][vehMod][13], vInfo[vehicleid][vehColorOne],
    vInfo[vehicleid][vehColorTwo], vInfo[vehicleid][vehX], vInfo[vehicleid][vehY], vInfo[vehicleid][vehZ], vInfo[vehicleid][vehA], vInfo[vehicleid][vehID]);
    mysql_tquery(mysql, query);
    return 1;
}
Saving all the mods even though some may not be used?

Edit: The limit for numberplates are 32 chars. why'd you save it as 16 chars,would that be enough?
ISmokezU is online now   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
[FilterScript] [E.V.O] Elite Vehicle Ownership [V1.0] [Dynamic Vehicle System] DarkSkull Filterscripts 12 19/09/2018 04:21 AM
[FilterScript] Vehicle Ownership System (MySQL R39-2) X337 Filterscripts 36 18/04/2018 03:42 AM
Vehicle ownership system Negat1Ve Scripting Help 5 30/10/2011 08:04 AM
[FilterScript] [FS] Vehicle Ownership System Zezombia Filterscripts 56 15/02/2011 06:45 AM
Vehicle ownership system [GTA:RP] Ivan_Pantovic Help Archive 1 21/04/2010 08:42 PM


All times are GMT. The time now is 04:42 AM.


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