SA-MP Forums Archive
A car dealership tutorial - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A car dealership tutorial (/showthread.php?tid=625211)



Errors trying to save cars - AndreiWow - 29.12.2016

Can someone link me a good car dealership tutorial?

I mean.. I know how to make the dealership but I'm not sure how to save the vehicles.





* this is a rep point waiting to be given to someone *


Re: A car dealership tutorial - ChristolisTV - 29.12.2016

https://sampforum.blast.hk/showthread.php?tid=452843

EDIT: If you didn't like this tutorial just ****** 'samp car dealership tutorial'. :P


Re: A car dealership tutorial - RedRex - 29.12.2016

Check This : https://sampforum.blast.hk/showthread.php?tid=186495

Hope if u like it


Re: A car dealership tutorial - AndreiWow - 29.12.2016

Quote:
Originally Posted by ChristolisTV
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=452843

EDIT: If you didn't like this tutorial just ****** 'samp car dealership tutorial'. :P
I saw that already and I searched too, there is noone and that tutorial doesn't save the cars and thats what I don't know how to do.


Re: A car dealership tutorial - AndreiWow - 30.12.2016

bump


Re: A car dealership tutorial - Hansrutger - 30.12.2016

Well, where would you like to save them?


Re: A car dealership tutorial - AndreiWow - 30.12.2016

I did something but I get these erros

Код:
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\pawno\include\fly.inc(42) : warning 217: loose indentation
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\pawno\include\fly.inc(43) : warning 217: loose indentation
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(870) : error 017: undefined symbol "engine"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(871) : error 017: undefined symbol "engine"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(888) : error 017: undefined symbol "engine"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(889) : error 017: undefined symbol "engine"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(906) : error 017: undefined symbol "engine"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(907) : error 017: undefined symbol "engine"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(1100) : error 017: undefined symbol "INI_String"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(1111) : error 017: undefined symbol "INI_String"
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(1122) : error 017: undefined symbol "INI_String"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
And the place where I get those errors is:
Код:
Line 1100: INI_String("Vehicle1Plate",PlayerInfo[playerid][pVehicle1Plate]);
And this:

Код:
if(PlayerInfo[playerid][pVehicle1] != 0)
					{
					    new model1 = PlayerInfo[playerid][pVehicle1Model];
					    new Float:car1x = PlayerInfo[playerid][pVehicle1X];
					    new Float:car1y = PlayerInfo[playerid][pVehicle1Y];
					    new Float:car1z = PlayerInfo[playerid][pVehicle1Z];
					    new Float:car1c = PlayerInfo[playerid][pVehicle1C];
					    new car1color1 = PlayerInfo[playerid][pVehicle1Color1];
					    new car1color2 = PlayerInfo[playerid][pVehicle1Color2];
					    new car1lock = PlayerInfo[playerid][pVehicle1Lock];
					    personalcar1[playerid] = CreateVehicle(model1, car1x, car1y, car1z, car1c, car1color1, car1color2, 999999);
					    SetVehicleNumberPlate(personalcar1[playerid], PlayerInfo[playerid][pVehicle1Plate]);
					    if(car1lock != 0)
					    {
							GetVehicleParamsEx(personalcar1[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
							SetVehicleParamsEx(personalcar1[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
						}
					}
					if(PlayerInfo[playerid][pVehicle2] != 0)
					{
					    new model2 = PlayerInfo[playerid][pVehicle2Model];
					    new Float:car2x = PlayerInfo[playerid][pVehicle2X];
					    new Float:car2y = PlayerInfo[playerid][pVehicle2Y];
					    new Float:car2z = PlayerInfo[playerid][pVehicle2Z];
					    new Float:car2c = PlayerInfo[playerid][pVehicle2C];
					    new car2color1 = PlayerInfo[playerid][pVehicle2Color1];
					    new car2color2 = PlayerInfo[playerid][pVehicle2Color2];
					    new car2lock = PlayerInfo[playerid][pVehicle2Lock];
					    personalcar2[playerid] = CreateVehicle(model2, car2x, car2y, car2z, car2c, car2color1, car2color2, 999999);
					    SetVehicleNumberPlate(personalcar2[playerid], PlayerInfo[playerid][pVehicle2Plate]);
					    if(car2lock != 0)
					    {
							GetVehicleParamsEx(personalcar2[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
							SetVehicleParamsEx(personalcar2[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
						}
					}
					if(PlayerInfo[playerid][pVehicle3] != 0)
					{
					    new model3 = PlayerInfo[playerid][pVehicle3Model];
					    new Float:car3x = PlayerInfo[playerid][pVehicle3X];
					    new Float:car3y = PlayerInfo[playerid][pVehicle3Y];
					    new Float:car3z = PlayerInfo[playerid][pVehicle3Z];
					    new Float:car3c = PlayerInfo[playerid][pVehicle3C];
					    new car3color1 = PlayerInfo[playerid][pVehicle3Color1];
					    new car3color2 = PlayerInfo[playerid][pVehicle3Color2];
					    new car3lock = PlayerInfo[playerid][pVehicle3Lock];
					    personalcar3[playerid] = CreateVehicle(model3, car3x, car3y, car3z, car3c, car3color1, car3color2, 999999);
					    SetVehicleNumberPlate(personalcar3[playerid], PlayerInfo[playerid][pVehicle3Plate]);
					    if(car3lock != 0)
					    {
							GetVehicleParamsEx(personalcar3[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
							SetVehicleParamsEx(personalcar3[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
						}
					}
				}



Re: A car dealership tutorial - Hansrutger - 30.12.2016

Alright so file system. What you need to look at is a tutorial, no matter what subject, but as long as it's for file systems, from the looks of it y_ini. This is the one I used back in the days before I knew what MySQL even was: https://sampforum.blast.hk/showthread.php?tid=273088

It's the same princip, vehicles... humans... NPC's... login information. It all leads to the same thing you are looking for, so no need for an exact tutorial with vehicle dealership being saved. Cheers and good luck.


Re: A car dealership tutorial - AndreiWow - 30.12.2016

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
Alright so file system. What you need to look at is a tutorial, no matter what subject, but as long as it's for file systems, from the looks of it y_ini. This is the one I used back in the days before I knew what MySQL even was: https://sampforum.blast.hk/showthread.php?tid=273088

It's the same princip, vehicles... humans... NPC's... login information. It all leads to the same thing you are looking for, so no need for an exact tutorial with vehicle dealership being saved. Cheers and good luck.
Umm yea, I made the save system but I get those erros that I listed above and I am not sure how to solve them.


Re: A car dealership tutorial - SoLetsGO - 30.12.2016

You probably haven't made a variable called engine. So it says that it's an undefined symbol.

I don't use INI so i'm not sure about it, but have you included all includes you need?
INI_String could also be a function which is no more used or something.