/* ----- Vehicle ownership & dealership by DanishHaq - http://forum.sa-mp.com/member.php?u=138844 -----
----- This person has the rights to use this script in whatever shape or form they wish, but the credits must remain with the creator -----*/
#define DIALOG_CATEGORY 3000
#define DIALOG_AIRCRAFTS 3001
#define DIALOG_BIKES 3002
#define DIALOG_CONVERTIBLES 3003
#define DIALOG_INDUSTRIAL 3004
#define DIALOG_LOWRIDERS 3005
#define DIALOG_OFFROAD 3006
#define DIALOG_SALOONS 3007
#define DIALOG_SPORTVEHICLES 3008
#define DIALOG_STATIONWAGONS 3009
#define DIALOG_BOATS 3010
#define DIALOG_UNIQUEVEHICLES 3011
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x008000FF
#define COLOR_WHITE 0xFFFFFFFF
new personalcar1[MAX_PLAYERS];
new personalcar2[MAX_PLAYERS];
new personalcar3[MAX_PLAYERS];
enum pInfo
{
pVehicle1,
pVehicle1Model,
Float:pVehicle1X,
Float:pVehicle1Y,
Float:pVehicle1Z,
Float:pVehicle1C,
pVehicle1Color1,
pVehicle1Color2,
pVehicle1Value,
pVehicle1Plate,
pVehicle1Lock,
pVehicle2,
pVehicle2Model,
Float:pVehicle2X,
Float:pVehicle2Y,
Float:pVehicle2Z,
Float:pVehicle2C,
pVehicle2Color1,
pVehicle2Color2,
pVehicle2Value,
pVehicle2Plate,
pVehicle2Lock,
pVehicle3,
pVehicle3Model,
Float:pVehicle3X,
Float:pVehicle3Y,
Float:pVehicle3Z,
Float:pVehicle3C,
pVehicle3Color1,
pVehicle3Color2,
pVehicle3Value,
pVehicle3Plate,
pVehicle3Lock,
};
new PlayerInfo[MAX_PLAYERS][pInfo]; // if you've got something like this, leave this line, else, add it
INI_Int("Vehicle1",PlayerInfo[playerid][pVehicle1]);
INI_Int("Vehicle1Model",PlayerInfo[playerid][pVehicle1Model]);
INI_Float("Vehicle1X",PlayerInfo[playerid][pVehicle1X]);
INI_Float("Vehicle1Y",PlayerInfo[playerid][pVehicle1Y]);
INI_Float("Vehicle1Z",PlayerInfo[playerid][pVehicle1Z]);
INI_Float("Vehicle1C",PlayerInfo[playerid][pVehicle1C]);
INI_Int("Vehicle1Color1",PlayerInfo[playerid][pVehicle1Color1]);
INI_Int("Vehicle1Color2",PlayerInfo[playerid][pVehicle1Color2]);
INI_Int("Vehicle1Value",PlayerInfo[playerid][pVehicle1Value]);
INI_String("Vehicle1Plate",PlayerInfo[playerid][pVehicle1Plate]);
INI_Int("Vehicle1Lock",PlayerInfo[playerid][pVehicle1Lock]);
INI_Int("Vehicle2",PlayerInfo[playerid][pVehicle2]);
INI_Int("Vehicle2Model",PlayerInfo[playerid][pVehicle2Model]);
INI_Float("Vehicle2X",PlayerInfo[playerid][pVehicle2X]);
INI_Float("Vehicle2Y",PlayerInfo[playerid][pVehicle2Y]);
INI_Float("Vehicle2Z",PlayerInfo[playerid][pVehicle2Z]);
INI_Float("Vehicle2C",PlayerInfo[playerid][pVehicle2C]);
INI_Int("Vehicle2Color1",PlayerInfo[playerid][pVehicle2Color1]);
INI_Int("Vehicle2Color2",PlayerInfo[playerid][pVehicle2Color2]);
INI_Int("Vehicle2Value",PlayerInfo[playerid][pVehicle2Value]);
INI_String("Vehicle2Plate",PlayerInfo[playerid][pVehicle2Plate]);
INI_Int("Vehicle2Lock",PlayerInfo[playerid][pVehicle2Lock]);
INI_Int("Vehicle3",PlayerInfo[playerid][pVehicle3]);
INI_Int("Vehicle3Model",PlayerInfo[playerid][pVehicle3Model]);
INI_Float("Vehicle3X",PlayerInfo[playerid][pVehicle3X]);
INI_Float("Vehicle3Y",PlayerInfo[playerid][pVehicle3Y]);
INI_Float("Vehicle3Z",PlayerInfo[playerid][pVehicle3Z]);
INI_Float("Vehicle3C",PlayerInfo[playerid][pVehicle3C]);
INI_Int("Vehicle3Color1",PlayerInfo[playerid][pVehicle3Color1]);
INI_Int("Vehicle3Color2",PlayerInfo[playerid][pVehicle3Color2]);
INI_Int("Vehicle3Value",PlayerInfo[playerid][pVehicle3Value]);
INI_String("Vehicle3Plate",PlayerInfo[playerid][pVehicle3Plate]);
INI_Int("Vehicle3Lock",PlayerInfo[playerid][pVehicle3Lock]);
INI_WriteInt(File,"Vehicle1",PlayerInfo[playerid][pVehicle1]);
INI_WriteInt(File,"Vehicle1Model",PlayerInfo[playerid][pVehicle1Model]);
INI_WriteFloat(File,"Vehicle1X",PlayerInfo[playerid][pVehicle1X]);
INI_WriteFloat(File,"Vehicle1Y",PlayerInfo[playerid][pVehicle1Y]);
INI_WriteFloat(File,"Vehicle1Z",PlayerInfo[playerid][pVehicle1Z]);
INI_WriteFloat(File,"Vehicle1C",PlayerInfo[playerid][pVehicle1C]);
INI_WriteInt(File,"Vehicle1Color1",PlayerInfo[playerid][pVehicle1Color1]);
INI_WriteInt(File,"Vehicle1Color2",PlayerInfo[playerid][pVehicle1Color2]);
INI_WriteInt(File,"Vehicle1Value",PlayerInfo[playerid][pVehicle1Value]);
INI_WriteString(File,"Vehicle1Plate",PlayerInfo[playerid][pVehicle1Plate]);
INI_WriteInt(File,"Vehicle1Lock",PlayerInfo[playerid][pVehicle1Lock]);
INI_WriteInt(File,"Vehicle2",PlayerInfo[playerid][pVehicle2]);
INI_WriteInt(File,"Vehicle2Model",PlayerInfo[playerid][pVehicle2Model]);
INI_WriteFloat(File,"Vehicle2X",PlayerInfo[playerid][pVehicle2X]);
INI_WriteFloat(File,"Vehicle2Y",PlayerInfo[playerid][pVehicle2Y]);
INI_WriteFloat(File,"Vehicle2Z",PlayerInfo[playerid][pVehicle2Z]);
INI_WriteFloat(File,"Vehicle2C",PlayerInfo[playerid][pVehicle2C]);
INI_WriteInt(File,"Vehicle2Color1",PlayerInfo[playerid][pVehicle2Color1]);
INI_WriteInt(File,"Vehicle2Color2",PlayerInfo[playerid][pVehicle2Color2]);
INI_WriteInt(File,"Vehicle2Value",PlayerInfo[playerid][pVehicle2Value]);
INI_WriteString(File,"Vehicle2Plate",PlayerInfo[playerid][pVehicle2Plate]);
INI_WriteInt(File,"Vehicle2Lock",PlayerInfo[playerid][pVehicle2Lock]);
INI_WriteInt(File,"Vehicle3",PlayerInfo[playerid][pVehicle3]);
INI_WriteInt(File,"Vehicle3Model",PlayerInfo[playerid][pVehicle3Model]);
INI_WriteFloat(File,"Vehicle3X",PlayerInfo[playerid][pVehicle3X]);
INI_WriteFloat(File,"Vehicle3Y",PlayerInfo[playerid][pVehicle3Y]);
INI_WriteFloat(File,"Vehicle3Z",PlayerInfo[playerid][pVehicle3Z]);
INI_WriteFloat(File,"Vehicle3C",PlayerInfo[playerid][pVehicle3C]);
INI_WriteInt(File,"Vehicle3Color1",PlayerInfo[playerid][pVehicle3Color1]);
INI_WriteInt(File,"Vehicle3Color2",PlayerInfo[playerid][pVehicle3Color2]);
INI_WriteInt(File,"Vehicle3Value",PlayerInfo[playerid][pVehicle3Value]);
INI_WriteString(File,"Vehicle3Plate",PlayerInfo[playerid][pVehicle3Plate]);
INI_WriteInt(File,"Vehicle3Lock",PlayerInfo[playerid][pVehicle3Lock]);
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);
}
}
DestroyVehicle(personalcar1[playerid]);
DestroyVehicle(personalcar2[playerid]);
DestroyVehicle(personalcar3[playerid]);
I like it, very useful! I believe you really worked hard on this, and it is worth it! Rep+ for this!
|
Tell me what it's like when you've tested it .
PS: You might get a few errors saying undefined symbol: COLOR_colorhere. I might have forgot to put them in, just reply here, tell me, and I'll give you the colors. |
gamemodes\cInfo2.pwn(95) : error 017: undefined symbol "engine"
gamemodes\cInfo2.pwn(96) : error 017: undefined symbol "engine"
gamemodes\cInfo2.pwn(113) : error 017: undefined symbol "engine"
gamemodes\cInfo2.pwn(114) : error 017: undefined symbol "engine"
gamemodes\cInfo2.pwn(131) : error 017: undefined symbol "engine"
gamemodes\cInfo2.pwn(132) : error 017: undefined symbol "engine"
gamemodes\cInfo2.pwn(135) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(135) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(136) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(136) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(137) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(137) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(138) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(138) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(139) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(139) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(140) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(140) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(141) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(141) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(142) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(142) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(143) : error 017: undefined symbol "name"
gamemodes\cInfo2.pwn(143) : error 017: undefined symbol "value"
gamemodes\cInfo2.pwn(144) : error 017: undefined symbol "INI_String"
gamemodes\cInfo2.pwn(145) : error 017: undefined symbol "name"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
Man i have errors.. :/
PHP Code:
|