SA-MP Forums Archive
[FilterScript] Vehicle Ownership System [MySQL] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Vehicle Ownership System [MySQL] (/showthread.php?tid=625343)



Dynamic Vehicle Ownership System [MySQL/Foreach] - oMa37 - 31.12.2016

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

Commands:

Player Commands:
Administrator Commands:
Requirements:

Streamer - Incognito
MySQL - BlueG/maddinat0r
Foreach - Kar/******
SSCANF2 - ******/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.


Re: Vehicle Ownership System [MySQL] - SyS - 31.12.2016

Nice one


Re: Vehicle Ownership System [MySQL] - Logic_ - 31.12.2016

'oly fu' dude - can't rep :3


Respuesta: Vehicle Ownership System [MySQL] - DarkChildren - 31.12.2016

Great!


Re: Vehicle Ownership System [MySQL] - RyderX - 31.12.2016

i like it thanks


Re: Vehicle Ownership System [MySQL] - Eoussama - 31.12.2016

noice


Re: Vehicle Ownership System [MySQL] - iLearner - 31.12.2016

So you've listened to my suggestion... good job tho!


Re: Vehicle Ownership System [MySQL] - Konstantinos - 31.12.2016

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.


Re: Vehicle Ownership System [MySQL] - Thanks - 31.12.2016

How to Do it? i mean how to instill it to mySQL I Already have mysql datebase


Re: Vehicle Ownership System [MySQL] - ISmokezU - 31.12.2016

Hey, isn't this a bad thing to do According to: (https://sampforum.blast.hk/showthread.php?tid=420363)

Код:
     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?


Re: Vehicle Ownership System [MySQL] - Bolex_ - 31.12.2016

Nothing unseen but yeah its MYSQL


Re: Vehicle Ownership System [MySQL] - oMa37 - 31.12.2016

Quote:
Originally Posted by iLearner
Посмотреть сообщение
So you've listened to my suggestion... good job tho!
As i said, it took me a bit time of thinking to release this or not, Thank you by the way.

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
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.
The R40+ version will be ready in few minutes or tomorrow, Thank you!

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
Hey, isn't this a bad thing to do According to: (https://sampforum.blast.hk/showthread.php?tid=420363)

Код:
...
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?
I didn't see this thread before when i was making the filterscript, But Konstantinos has already told me about it, Thank you!

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
Nice one
Quote:
Originally Posted by ALiScripter
Посмотреть сообщение
'oly fu' dude - can't rep :3
Quote:
Originally Posted by Dark_Children
Посмотреть сообщение
Great!
Quote:
Originally Posted by RyderX
Посмотреть сообщение
i like it thanks
Quote:
Originally Posted by Eoussama
Посмотреть сообщение
noice
Thank you guys, Appreciate it!


Re: Vehicle Ownership System [MySQL] - oMa37 - 31.12.2016

Update:

- Added MySQL R40+ version.
- Few improvements.


Re: Vehicle Ownership System [MySQL] - saffierr - 31.12.2016

Nice filterscript, Keep up the good work!


Re: Vehicle Ownership System [MySQL] - Shaheen - 04.01.2017

Cool one


Re: Vehicle Ownership System [MySQL] - feheristi97 - 20.02.2017

I downloaded the newest plugins, includes, samp version but I still get the same error back. If you remove that line then you'll get the same error back to another line.


C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(103) : error 075: input line too long (after substitutions)
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(104) : error 037: invalid string (possibly non-terminated string)
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(104) : error 017: undefined symbol "CREATE"
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(104) : error 017: undefined symbol "TABLE"
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(104) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors


Re: Vehicle Ownership System [MySQL] - X337 - 20.02.2017

Either use zeex pawn compiler patches, or run this query in your database
Код:
CREATE TABLE IF NOT EXISTS `Vehicles` (`vehID` int(11) NOT NULL, `vehModel` int(11) NOT NULL, `vehName` varchar(25) NOT NULL, `vehOwner` varchar(25) NOT NULL default '-', `vehPlate` varchar(16) NOT NULL default 'UG', `vehPrice` int(11) NOT NULL, `vehLock` int(11) NOT NULL, `vehMod_1` int(11) NOT NULL, `vehMod_2` int(11) NOT NULL, `vehMod_3` int(11) NOT NULL, `vehMod_4` int(11) NOT NULL, `vehMod_5` int(11) NOT NULL, `vehMod_6` int(11) NOT NULL, `vehMod_7` int(11) NOT NULL, `vehMod_8` int(11) NOT NULL, `vehMod_9` int(11) NOT NULL, `vehMod_10` int(11) NOT NULL, `vehMod_11` int(11) NOT NULL, `vehMod_12` int(11) NOT NULL, `vehMod_13` int(11) NOT NULL, `vehMod_14` int(11) NOT NULL, `vehColorOne` int(11) NOT NULL, `vehColorTwo` int(11) NOT NULL, `vehX` float NOT NULL, `vehY` float NOT NULL, `vehZ` float NOT NULL, `vehA` float NOT NULL, UNIQUE KEY `vehID` (`vehID`))
and remove these codes
Код:
mysql_tquery(mysql, "CREATE TABLE IF NOT EXISTS `Vehicles` (\
      `vehID` int(11) NOT NULL,\
      `vehModel` int(11) NOT NULL,\
      `vehName` varchar(25) NOT NULL,\
      `vehOwner` varchar(25) NOT NULL default '-',\
      `vehPlate` varchar(16) NOT NULL default 'UG',\
      `vehPrice` int(11) NOT NULL,\
      `vehLock` int(11) NOT NULL,\
      `vehMod_1` int(11) NOT NULL,\
      `vehMod_2` int(11) NOT NULL,\
      `vehMod_3` int(11) NOT NULL,\
      `vehMod_4` int(11) NOT NULL,\
      `vehMod_5` int(11) NOT NULL,\
      `vehMod_6` int(11) NOT NULL,\
      `vehMod_7` int(11) NOT NULL,\
      `vehMod_8` int(11) NOT NULL,\
      `vehMod_9` int(11) NOT NULL,\
      `vehMod_10` int(11) NOT NULL,\
      `vehMod_11` int(11) NOT NULL,\
      `vehMod_12` int(11) NOT NULL,\
      `vehMod_13` int(11) NOT NULL,\
      `vehMod_14` int(11) NOT NULL,\
      `vehColorOne` int(11) NOT NULL,\
      `vehColorTwo` int(11) NOT NULL,\
      `vehX` float NOT NULL,\
      `vehY` float NOT NULL,\
      `vehZ` float NOT NULL,\
      `vehA` float NOT NULL,\
      UNIQUE KEY `vehID` (`vehID`))");



Re: Vehicle Ownership System [MySQL] - feheristi97 - 20.02.2017

I know. I tried to do the same thing, but you get now error to another line.

C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(673) : error 075: input line too long (after substitutions)
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(674) : error 037: invalid string (possibly non-terminated string)
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(674) : error 017: undefined symbol "UPDATE"
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(674) : error 029: invalid expression, assumed zero
C:\Users\Desktop\samp037_svr_R2-1-1_win32\gamemodes\gamemode.pwn(674) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.


Re: Vehicle Ownership System [MySQL] - X337 - 20.02.2017

Default pawn compiler has a line limit of 511. You have to split the format or use this to compile: https://sampforum.blast.hk/showthread.php?tid=473595


Re: Vehicle Ownership System [MySQL] - feheristi97 - 20.02.2017

Thank you. I used this before, but I totally forgot about it.