Код:
#define DEALER_BIKE (0)
#define DEALER_OFF_ROAD (1)
#define DEALER_SALOONS (2)
#define DEALER_INDUSTRIAL (3)
#define DEALER_LOWRIDERS (4)
#define DEALER_UNIQUE (5)
#define DEALER_CONVERT (6)
#define DEALER_SPORT (7)
#define DEALER_PUBLIC_S (8)
#define DEALER_WAGONS (9)
#define DEALER_BOATS (10)
#define DEALER_AIRPLANES (11)
#define DIALOG_SELCAR (951)
enum DealershipInfo
{
Model,
Price
};
new pAccessingDealerShip[MAX_PLAYERS];
new BikeDealerArray[][DealershipInfo] =
{
{462, 10000}, // faggio
{468, 150000}, // sanchez
{463, 40000}, // freeway
{471, 70000}, // quad
{481, 500}, // bmx
{509, 1000}, // bike
{521, 150000}, // fcr-900
{586, 40000}, // wayfarer
{510, 2500} // mountain bike
};
new SaloonsDealerArray[][DealershipInfo] =
{
{401, 40000}, // bravura
{405, 130000}, // sentinel
{410, 30000}, // manana
{419, 50000}, // esperanto
{421, 100000}, // washington
{426, 140000}, // premier
{436, 35000}, // previon
{445, 45000}, // admiral
{466, 50000}, // glendale
{467, 35000}, // oceanic
{474, 60000}, // hermes
{491, 40000}, // virgo
{492, 45000}, // greenwood
{507, 120000}, // elegant
{516, 40000}, // nebula
{517, 65000}, // majestic
{518, 45000}, // buccaneer
{526, 40000}, // fortune
{527, 45000}, // cadrona
{529, 45000}, // willard
{540, 50000}, // vincent
{542, 130000}, // clover
{546, 45000}, // intruder
{547, 35000}, // primo
{549, 40000}, // tampa
{550, 55000}, // sunrise
{551, 130000}, // merit
{560, 750000}, // sultan
{562, 200000}, // elegy
{580, 160000}, // stafford
{585, 500000} // emperor
};
new OffRoadDealerArray[][DealershipInfo] =
{
{401, 40000}, // bravura
{405, 130000}, // sentinel
{410, 30000}, // manana
{419, 50000}, // esperanto
{421, 100000}, // washington
{426, 140000}, // premier
{436, 35000}, // previon
{445, 45000}, // admiral
{466, 50000}, // glendale
{467, 35000}, // oceanic
{474, 60000}, // hermes
{491, 40000}, // virgo
{492, 45000}, // greenwood
{507, 120000}, // elegant
{516, 40000}, // nebula
{517, 65000}, // majestic
{518, 45000}, // buccaneer
{526, 40000}, // fortune
{527, 45000}, // cadrona
{529, 45000}, // willard
{540, 50000}, // vincent
{542, 130000}, // clover
{546, 45000}, // intruder
{547, 35000}, // primo
{549, 40000}, // tampa
{550, 55000}, // sunrise
{551, 130000}, // merit
{560, 750000}, // sultan
{562, 200000}, // elegy
{580, 160000}, // stafford
{585, 500000} // emperor
};
new SaloonsDealerArray[][DealershipInfo] =
{
{401, 40000}, // bravura
{405, 130000}, // sentinel
{410, 30000}, // manana
{419, 50000}, // esperanto
{421, 100000}, // washington
{426, 140000}, // premier
{436, 35000}, // previon
{445, 45000}, // admiral
{466, 50000}, // glendale
{467, 35000}, // oceanic
{474, 60000}, // hermes
{491, 40000}, // virgo
{492, 45000}, // greenwood
{507, 120000}, // elegant
{516, 40000}, // nebula
{517, 65000}, // majestic
{518, 45000}, // buccaneer
{526, 40000}, // fortune
{527, 45000}, // cadrona
{529, 45000}, // willard
{540, 50000}, // vincent
{542, 130000}, // clover
{546, 45000}, // intruder
{547, 35000}, // primo
{549, 40000}, // tampa
{550, 55000}, // sunrise
{551, 130000}, // merit
{560, 750000}, // sultan
{562, 200000}, // elegy
{580, 160000}, // stafford
{585, 500000} // emperor
};
new IndustrialDealerArray[][DealershipInfo] =
{
{401, 40000}, // bravura
{405, 130000}, // sentinel
{410, 30000}, // manana
{419, 50000}, // esperanto
{421, 100000}, // washington
{426, 140000}, // premier
{436, 35000}, // previon
{445, 45000}, // admiral
{466, 50000}, // glendale
{467, 35000}, // oceanic
{474, 60000}, // hermes
{491, 40000}, // virgo
{492, 45000}, // greenwood
{507, 120000}, // elegant
{516, 40000}, // nebula
{517, 65000}, // majestic
{518, 45000}, // buccaneer
{526, 40000}, // fortune
{527, 45000}, // cadrona
{529, 45000}, // willard
{540, 50000}, // vincent
{542, 130000}, // clover
{546, 45000}, // intruder
{547, 35000}, // primo
{549, 40000}, // tampa
{550, 55000}, // sunrise
{551, 130000}, // merit
{560, 750000}, // sultan
{562, 200000}, // elegy
{580, 160000}, // stafford
{585, 500000} // emperor
};
new LowridersDealerArray[][DealershipInfo] =
{
{401, 40000}, // bravura
{405, 130000}, // sentinel
{410, 30000}, // manana
{419, 50000}, // esperanto
{421, 100000}, // washington
{426, 140000}, // premier
{436, 35000}, // previon
{445, 45000}, // admiral
{466, 50000}, // glendale
{467, 35000}, // oceanic
{474, 60000}, // hermes
{491, 40000}, // virgo
{492, 45000}, // greenwood
{507, 120000}, // elegant
{516, 40000}, // nebula
{517, 65000}, // majestic
{518, 45000}, // buccaneer
{526, 40000}, // fortune
{527, 45000}, // cadrona
{529, 45000}, // willard
{540, 50000}, // vincent
{542, 130000}, // clover
{546, 45000}, // intruder
{547, 35000}, // primo
{549, 40000}, // tampa
{550, 55000}, // sunrise
{551, 130000}, // merit
{560, 750000}, // sultan
{562, 200000}, // elegy
{580, 160000}, // stafford
{585, 500000} // emperor
};
new UniqueDealerArray[][DealershipInfo] =
{
{586, 40000}, // roadtrain
{510, 2500}, // dft-30
{462, 10000}, // trashmaster
{468, 150000}, // pony
{463, 40000}, // bobcat
{471, 70000}, // rumpo
{481, 500}, // berkley's rc van
{509, 1000}, // walton
{521, 150000}, // burrito
{586, 40000}, // benson
{510, 2500} // sadler
};
new ConvertDealerArray[][DealershipInfo] =
{
{586, 40000}, // roadtrain
{510, 2500}, // dft-30
{462, 10000}, // trashmaster
{468, 150000}, // pony
{463, 40000}, // bobcat
{471, 70000}, // rumpo
{481, 500}, // berkley's rc van
{509, 1000}, // walton
{521, 150000}, // burrito
{586, 40000}, // benson
{510, 2500} // sadler
};
new SportDealerArray[][DealershipInfo] =
{
{586, 40000}, // roadtrain
{510, 2500}, // dft-30
{462, 10000}, // trashmaster
{468, 150000}, // pony
{463, 40000}, // bobcat
{471, 70000}, // rumpo
{481, 500}, // berkley's rc van
{509, 1000}, // walton
{521, 150000}, // burrito
{586, 40000}, // benson
{510, 2500} // sadler
};
new PublicDealerArray[][DealershipInfo] =
{
{586, 40000}, // roadtrain
{510, 2500}, // dft-30
{462, 10000}, // trashmaster
{468, 150000}, // pony
{463, 40000}, // bobcat
{471, 70000}, // rumpo
{481, 500}, // berkley's rc van
{509, 1000}, // walton
{521, 150000}, // burrito
{586, 40000}, // benson
{510, 2500} // sadler
};
new BoatsDealerArray[][DealershipInfo] =
{
{586, 40000}, // roadtrain
{510, 2500}, // dft-30
{462, 10000}, // trashmaster
{468, 150000}, // pony
{463, 40000}, // bobcat
{471, 70000}, // rumpo
{481, 500}, // berkley's rc van
{509, 1000}, // walton
{521, 150000}, // burrito
{586, 40000}, // benson
{510, 2500} // sadler
};
new AirplanesDealerArray[][DealershipInfo] =
{
{586, 40000}, // roadtrain
{510, 2500}, // dft-30
{462, 10000}, // trashmaster
{468, 150000}, // pony
{463, 40000}, // bobcat
{471, 70000}, // rumpo
{481, 500}, // berkley's rc van
{509, 1000}, // walton
{521, 150000}, // burrito
{586, 40000}, // benson
{510, 2500} // sadler
};
new DealershipBrowsingInt[MAX_PLAYERS];
new PurchasingCar[MAX_PLAYERS];
new PurchasingCarPrice[MAX_PLAYERS];
new PlayerText:VehDashTD[7][MAX_PLAYERS];
new PlayerText: DealershipTD[18][MAX_PLAYERS];
CMD:carbuy(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_SELCAR, DIALOG_STYLE_LIST, "Vehicle Dealership", "Bikes\nOff Road\nSaloons\nIndustrial\nLowriders\nUnique Vehicles\nConvertibles\nSport Vehicles\nPublic Service\nStation Wagons\nBoats\nAirplanes", "Select", "Cancel");
SelectTextDraw(playerid, 0xffaaaaaa);
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_SELCAR)
{
if(response)
{
pAccessingDealerShip[playerid] = listitem;
DestroyDealerShipTextDraws(playerid);
LoadDealerShipTextDraws(playerid);
ShowDealerShipTextDraws(playerid);
}
}
#if defined car_OnDialogResponse
return car_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
#else
return false;
#endif
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
#define _ALS_OnDialogResponse
#endif
#define OnDialogResponse car_OnDialogResponse
#if defined car_OnDialogResponse
forward car_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
#endif
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == DealershipTD[9][playerid]) // left
{
new id = DealershipBrowsingInt[playerid] --;
if(id == 0)
{
switch(pAccessingDealerShip[playerid])
{
case DEALER_BIKE: DealershipBrowsingInt[playerid] = sizeof(BikeDealerArray) - 1;
case DEALER_OFF_ROAD: DealershipBrowsingInt[playerid] = sizeof(OffRoadDealerArray) - 1;
case DEALER_SALOONS: DealershipBrowsingInt[playerid] = sizeof(SaloonsDealerArray) - 1;
case DEALER_INDUSTRIAL: DealershipBrowsingInt[playerid] = sizeof(IndustrialDealerArray) - 1;
case DEALER_LOWRIDERS: DealershipBrowsingInt[playerid] = sizeof(LowridersDealerArray) - 1;
case DEALER_UNIQUE: DealershipBrowsingInt[playerid] = sizeof(UniqueDealerArray) - 1;
case DEALER_CONVERT: DealershipBrowsingInt[playerid] = sizeof(ConvertDealerArray) - 1;
case DEALER_SPORT: DealershipBrowsingInt[playerid] = sizeof(SportDealerArray) - 1;
case DEALER_PUBLIC_S: DealershipBrowsingInt[playerid] = sizeof(PublicDealerArray) - 1;
case DEALER_WAGONS: DealershipBrowsingInt[playerid] = sizeof(StationDealerArray) - 1;
case DEALER_BOATS: DealershipBrowsingInt[playerid] = sizeof(BoatsDealerArray) - 1;
case DEALER_AIRPLANES: DealershipBrowsingInt[playerid] = sizeof(AirplanesDealerArray) - 1;
}
}
UpdateDealershipDraw(playerid, id);
}
if(playertextid == DealershipTD[10][playerid]) // right
{
new id = DealershipBrowsingInt[playerid] ++;
switch(pAccessingDealerShip[playerid])
{
case DEALER_BIKE:
{
if(id == sizeof(BikeDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_OFF_ROAD:
{
if(id == sizeof(OffRoadDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_SALOONS:
{
if(id == sizeof(SaloonsDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_INDUSTRIAL:
{
if(id == sizeof(IndustrialDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_LOWRIDERS:
{
if(id == sizeof(LowridersDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_UNIQUE:
{
if(id == sizeof(UniqueDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_CONVERT:
{
if(id == sizeof(ConvertDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_SPORT:
{
if(id == sizeof(SportDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_PUBLIC_S:
{
if(id == sizeof(PublicDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_WAGONS:
{
if(id == sizeof(StationDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_BOATS:
{
if(id == sizeof(BoatsDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
case DEALER_AIRPLANES:
{
if(id == sizeof(AirplanesDealerArray) - 1)
DealershipBrowsingInt[playerid] = 0;
}
}
UpdateDealershipDraw(playerid, id);
}
if(playertextid == DealershipTD[16][playerid]) // buy
{
new lp[10], string[120], id = PurchasingCar[playerid];
if(Player[playerid][VehSlot1] != 999 && Player[playerid][VehSlot2] != 999)
return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]{E0E0E0} You have no vehicle slots left!");
format(string, sizeof(string), "[INFO]{E0E0E0} You have purchased a %s for $%d. To park it, use /carpark.", GetVehicleNameFromModelID(id), PurchasingCarPrice[playerid]);
SendClientMessage(playerid, COLOR_BLUE, string);
// License Plate Shitty Algorithm
new temp = random(4500500) + random(4900500);
format(lp, sizeof(lp), "BC_%d", temp);
HideDealerShipTextDraws(playerid);
CancelSelectTextDraw(playerid);
if(IsValidVehicleModel(id))
{
CreateStaticVehicle(playerid, id, GetUserName(playerid), 2, lp, -1991.4955, 254.4221, 34.7118, 0.0, random(255), random(255));
PutPlayerInVehicle(playerid, vCount, 0);
}
else return SendClientMessage(playerid, COLOR_ERROR, "The model ID of the vehicle you are trying to purchase is invalid! Please try again!");
}
if(playertextid == DealershipTD[17][playerid]) // close
{
PurchasingCar[playerid] = 0;
DealershipBrowsingInt[playerid] = 0;
HideDealerShipTextDraws(playerid);
CancelSelectTextDraw(playerid);
}
#if defined car_OnPlayerClickPlayerTextDraw
return car_OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
#else
return false;
#endif
}
#if defined _ALS_OnPlayerClickPlayerTD
#undef OnPlayerClickPlayerTextDraw
#else
#define _ALS_OnPlayerClickPlayerTD
#endif
#define OnPlayerClickPlayerTextDraw car_OnPlayerClickPlayerTextDraw
#if defined car_OnPlayerClickPlayerTextDraw
forward car_OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
#endif
UpdateDealershipDraw(playerid, id)
{
new string[20];
switch(pAccessingDealerShip[playerid])
{
case DEALER_BIKE:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], BikeDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], BikeDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(BikeDealerArray[id][Model]));
format(string, sizeof(string), "%d", BikeDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = BikeDealerArray[id][Model];
PurchasingCarPrice[playerid] = BikeDealerArray[id][Price];
}
case DEALER_OFF_ROAD:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], OffRoadDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], OffRoadDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(OffRoadDealerArray[id][Model]));
format(string, sizeof(string), "%d", OffRoadDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = OffRoadDealerArray[id][Model];
PurchasingCarPrice[playerid] = OffRoadDealerArray[id][Price];
}
case DEALER_SALOONS:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], SaloonsDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], SaloonsDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(SaloonsDealerArray[id][Model]));
format(string, sizeof(string), "%d", SaloonsDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = SaloonsDealerArray[id][Model];
PurchasingCarPrice[playerid] = SaloonsDealerArray[id][Price];
}
case DEALER_INDUSTRIAL:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], IndustrialDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], IndustrialDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(IndustrialDealerArray[id][Model]));
format(string, sizeof(string), "%d", IndustrialDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = IndustrialDealerArray[id][Model];
PurchasingCarPrice[playerid] = IndustrialDealerArray[id][Price];
}
case DEALER_LOWRIDERS:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], LowridersDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], LowridersDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(LowridersDealerArray[id][Model]));
format(string, sizeof(string), "%d", LowridersDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = LowridersDealerArray[id][Model];
PurchasingCarPrice[playerid] = LowridersDealerArray[id][Price];
}
case DEALER_UNIQUE:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], UniqueDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], UniqueDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(UniqueDealerArray[id][Model]));
format(string, sizeof(string), "%d", UniqueDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = UniqueDealerArray[id][Model];
PurchasingCarPrice[playerid] = UniqueDealerArray[id][Price];
}
case DEALER_CONVERT:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], ConvertDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], ConvertDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(ConvertDealerArray[id][Model]));
format(string, sizeof(string), "%d", ConvertDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = ConvertDealerArray[id][Model];
PurchasingCarPrice[playerid] = ConvertDealerArray[id][Price];
}
case DEALER_SPORT:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], SportDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], SportDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(SportDealerArray[id][Model]));
format(string, sizeof(string), "%d", SportDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = SportDealerArray[id][Model];
PurchasingCarPrice[playerid] = SportDealerArray[id][Price];
}
case DEALER_PUBLIC_S:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], PublicDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], PublicDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(PublicDealerArray[id][Model]));
format(string, sizeof(string), "%d", PublicDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = PublicDealerArray[id][Model];
PurchasingCarPrice[playerid] = PublicDealerArray[id][Price];
}
case DEALER_WAGONS:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], StationDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], StationDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(StationDealerArray[id][Model]));
format(string, sizeof(string), "%d", StationDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = StationDealerArray[id][Model];
PurchasingCarPrice[playerid] = StationDealerArray[id][Price];
}
case DEALER_BOATS:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], BoatsDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], BoatsDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(BoatsDealerArray[id][Model]));
format(string, sizeof(string), "%d", BoatsDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = BoatsDealerArray[id][Model];
PurchasingCarPrice[playerid] = BoatsDealerArray[id][Price];
}
case DEALER_AIRPLANES:
{
PlayerTextDrawHide(playerid, DealershipTD[3][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], AirplanesDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[3][playerid]);
PlayerTextDrawHide(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], AirplanesDealerArray[id][Model]);
PlayerTextDrawShow(playerid, DealershipTD[4][playerid]);
PlayerTextDrawSetString(playerid, DealershipTD[6][playerid], GetVehicleNameFromModelID(AirplanesDealerArray[id][Model]));
format(string, sizeof(string), "%d", AirplanesDealerArray[id][Price]);
PlayerTextDrawSetString(playerid, DealershipTD[8][playerid], string);
PurchasingCar[playerid] = AirplanesDealerArray[id][Model];
PurchasingCarPrice[playerid] = AirplanesDealerArray[id][Price];
}
}
return true;
}
ShowDealerShipTextDraws(playerid)
{
for(new i; i < sizeof(DealershipTD); i ++)
{
PlayerTextDrawShow(playerid, DealershipTD[i][playerid]);
}
return true;
}
HideDealerShipTextDraws(playerid)
{
for(new i; i < sizeof(DealershipTD); i ++)
{
PlayerTextDrawHide(playerid, DealershipTD[i][playerid]);
}
return true;
}
DestroyDealerShipTextDraws(playerid)
{
for(new i; i < sizeof(DealershipTD); i ++)
{
PlayerTextDrawDestroy(playerid, DealershipTD[i][playerid]);
}
return true;
}
LoadDealerShipTextDraws(playerid)
{
DealershipTD[0][playerid] = CreatePlayerTextDraw(playerid, 497.000000, 111.425933, "usebox");
PlayerTextDrawLetterSize(playerid, DealershipTD[0][playerid], 0.000000, 24.680854);
PlayerTextDrawTextSize(playerid, DealershipTD[0][playerid], 174.333328, 0.000000);
PlayerTextDrawAlignment(playerid, DealershipTD[0][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[0][playerid], 0);
PlayerTextDrawUseBox(playerid, DealershipTD[0][playerid], true);
PlayerTextDrawBoxColor(playerid, DealershipTD[0][playerid], 0x33333355);
PlayerTextDrawSetShadow(playerid, DealershipTD[0][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[0][playerid], 0);
PlayerTextDrawFont(playerid, DealershipTD[0][playerid], 0);
DealershipTD[1][playerid] = CreatePlayerTextDraw(playerid, 493.999877, 114.329635, "usebox");
PlayerTextDrawLetterSize(playerid, DealershipTD[1][playerid], 0.000000, 24.027782);
PlayerTextDrawTextSize(playerid, DealershipTD[1][playerid], 177.333312, 0.000000);
PlayerTextDrawAlignment(playerid, DealershipTD[1][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[1][playerid], 0);
PlayerTextDrawUseBox(playerid, DealershipTD[1][playerid], true);
PlayerTextDrawBoxColor(playerid, DealershipTD[1][playerid], 0x93C4C455);
PlayerTextDrawSetShadow(playerid, DealershipTD[1][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[1][playerid], 0);
PlayerTextDrawFont(playerid, DealershipTD[1][playerid], 0);
DealershipTD[2][playerid] = CreatePlayerTextDraw(playerid, 236.000045, 117.392532, "Purchase A Vehicle");
PlayerTextDrawLetterSize(playerid, DealershipTD[2][playerid], 0.504999, 1.853036);
PlayerTextDrawAlignment(playerid, DealershipTD[2][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[2][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[2][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[2][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[2][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[2][playerid], 2);
PlayerTextDrawSetProportional(playerid, DealershipTD[2][playerid], 1);
// MODEL BOX
DealershipTD[3][playerid] = CreatePlayerTextDraw(playerid, 200, 120, "usebox");
PlayerTextDrawFont(playerid, DealershipTD[3][playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawLetterSize(playerid, DealershipTD[3][playerid], 0.000000, 14.030247);
PlayerTextDrawUseBox(playerid, DealershipTD[3][playerid], true);
PlayerTextDrawTextSize(playerid, DealershipTD[3][playerid], 150.0, 127.0);
PlayerTextDrawBoxColor(playerid, DealershipTD[3][playerid], 0x00000000);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[3][playerid], 0);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[3][playerid], 19300);
PlayerTextDrawSetPreviewRot(playerid, DealershipTD[3][playerid], -10.0, 0.0, -40.0, 0.9);
PlayerTextDrawSetPreviewVehCol(playerid, DealershipTD[3][playerid], 193, 192);
DealershipTD[4][playerid] = CreatePlayerTextDraw(playerid, 187, 180, "usebox");
PlayerTextDrawFont(playerid, DealershipTD[4][playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawLetterSize(playerid, DealershipTD[4][playerid], 0.000000, 14.030247);
PlayerTextDrawUseBox(playerid, DealershipTD[4][playerid], true);
PlayerTextDrawTextSize(playerid, DealershipTD[4][playerid], 150.0, 127.0);
PlayerTextDrawBoxColor(playerid, DealershipTD[4][playerid], 0x00000000);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[4][playerid], 0);
PlayerTextDrawSetPreviewModel(playerid, DealershipTD[4][playerid], 1239);
PlayerTextDrawSetPreviewRot(playerid, DealershipTD[4][playerid], -10.0, 0.0, -130.0, 0.9);
PlayerTextDrawSetPreviewVehCol(playerid, DealershipTD[4][playerid], 193, 192);
DealershipTD[5][playerid] = CreatePlayerTextDraw(playerid, 361.333282, 154.725906, "Name:");
PlayerTextDrawLetterSize(playerid, DealershipTD[5][playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, DealershipTD[5][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[5][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[5][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[5][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[5][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[5][playerid], 2);
PlayerTextDrawSetProportional(playerid, DealershipTD[5][playerid], 1);
DealershipTD[6][playerid] = CreatePlayerTextDraw(playerid, 361.333374, 171.733352, "\0");
PlayerTextDrawLetterSize(playerid, DealershipTD[6][playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, DealershipTD[6][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[6][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[6][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[6][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[6][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[6][playerid], 1);
PlayerTextDrawSetProportional(playerid, DealershipTD[6][playerid], 1);
DealershipTD[7][playerid] = CreatePlayerTextDraw(playerid, 361.333343, 202.014831, "Price:");
PlayerTextDrawLetterSize(playerid, DealershipTD[7][playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, DealershipTD[7][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[7][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[7][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[7][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[7][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[7][playerid], 2);
PlayerTextDrawSetProportional(playerid, DealershipTD[7][playerid], 1);
DealershipTD[8][playerid] = CreatePlayerTextDraw(playerid, 361.666595, 217.362945, "\0");
PlayerTextDrawLetterSize(playerid, DealershipTD[8][playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, DealershipTD[8][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[8][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[8][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[8][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[8][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[8][playerid], 1);
PlayerTextDrawSetProportional(playerid, DealershipTD[8][playerid], 1);
DealershipTD[9][playerid] = CreatePlayerTextDraw(playerid, 348.000091, 248.474014, "LD_BEAT:left");
PlayerTextDrawLetterSize(playerid, DealershipTD[9][playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, DealershipTD[9][playerid], 18.999998, 21.155551);
PlayerTextDrawAlignment(playerid, DealershipTD[9][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[9][playerid], 0xBBC2C488);
PlayerTextDrawSetShadow(playerid, DealershipTD[9][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[9][playerid], 1);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[9][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[9][playerid], 4);
PlayerTextDrawSetProportional(playerid, DealershipTD[9][playerid], 1);
PlayerTextDrawSetSelectable(playerid, DealershipTD[9][playerid], 1);
DealershipTD[10][playerid] = CreatePlayerTextDraw(playerid, 469.666748, 248.474105, "LD_BEAT:right");
PlayerTextDrawLetterSize(playerid, DealershipTD[10][playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, DealershipTD[10][playerid], 18.999998, 21.155551);
PlayerTextDrawAlignment(playerid, DealershipTD[10][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[10][playerid], 0xBBC2C488);
PlayerTextDrawSetShadow(playerid, DealershipTD[10][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[10][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[10][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[10][playerid], 4);
PlayerTextDrawSetProportional(playerid, DealershipTD[10][playerid], 1);
PlayerTextDrawSetSelectable(playerid, DealershipTD[10][playerid], 1);
DealershipTD[11][playerid] = CreatePlayerTextDraw(playerid, 378.0, 251.792510, "Select Car");
PlayerTextDrawLetterSize(playerid, DealershipTD[11][playerid], 0.332000, 1.284741);
PlayerTextDrawAlignment(playerid, DealershipTD[11][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[11][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[11][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[11][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[11][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[11][playerid], 2);
PlayerTextDrawSetProportional(playerid, DealershipTD[11][playerid], 1);
DealershipTD[12][playerid] = CreatePlayerTextDraw(playerid, 292.666656, 294.774078, "usebox");
PlayerTextDrawLetterSize(playerid, DealershipTD[12][playerid], 0.000000, 2.413374);
PlayerTextDrawTextSize(playerid, DealershipTD[12][playerid], 191.000000, 0.000000);
PlayerTextDrawAlignment(playerid, DealershipTD[12][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[12][playerid], 0);
PlayerTextDrawUseBox(playerid, DealershipTD[12][playerid], true);
PlayerTextDrawBoxColor(playerid, DealershipTD[12][playerid], 0x33333355);
PlayerTextDrawSetShadow(playerid, DealershipTD[12][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[12][playerid], 0);
PlayerTextDrawFont(playerid, DealershipTD[12][playerid], 0);
DealershipTD[13][playerid] = CreatePlayerTextDraw(playerid, 479.999877, 294.773986, "usebox");
PlayerTextDrawLetterSize(playerid, DealershipTD[13][playerid], 0.000000, 2.356581);
PlayerTextDrawTextSize(playerid, DealershipTD[13][playerid], 378.666595, 0.000000);
PlayerTextDrawAlignment(playerid, DealershipTD[13][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[13][playerid], 0);
PlayerTextDrawUseBox(playerid, DealershipTD[13][playerid], true);
PlayerTextDrawBoxColor(playerid, DealershipTD[13][playerid], 0x33333355);
PlayerTextDrawSetShadow(playerid, DealershipTD[13][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[13][playerid], 0);
PlayerTextDrawFont(playerid, DealershipTD[13][playerid], 0);
DealershipTD[14][playerid] = CreatePlayerTextDraw(playerid, 291.333374, 296.018463, "usebox");
PlayerTextDrawLetterSize(playerid, DealershipTD[14][playerid], 0.000000, 2.099380);
PlayerTextDrawTextSize(playerid, DealershipTD[14][playerid], 192.333343, 0.000000);
PlayerTextDrawAlignment(playerid, DealershipTD[14][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[14][playerid], 0);
PlayerTextDrawUseBox(playerid, DealershipTD[14][playerid], true);
PlayerTextDrawBoxColor(playerid, DealershipTD[14][playerid], 0xBBC2C455);
PlayerTextDrawSetShadow(playerid, DealershipTD[14][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[14][playerid], 0);
PlayerTextDrawFont(playerid, DealershipTD[14][playerid], 0);
DealershipTD[15][playerid] = CreatePlayerTextDraw(playerid, 478.666625, 296.018585, "usebox");
PlayerTextDrawLetterSize(playerid, DealershipTD[15][playerid], 0.000000, 2.026129);
PlayerTextDrawTextSize(playerid, DealershipTD[15][playerid], 380.000000, 0.000000);
PlayerTextDrawAlignment(playerid, DealershipTD[15][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[15][playerid], 0);
PlayerTextDrawUseBox(playerid, DealershipTD[15][playerid], true);
PlayerTextDrawBoxColor(playerid, DealershipTD[15][playerid], 0xBBC2C455);
PlayerTextDrawSetShadow(playerid, DealershipTD[15][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[15][playerid], 0);
PlayerTextDrawFont(playerid, DealershipTD[15][playerid], 0);
DealershipTD[16][playerid] = CreatePlayerTextDraw(playerid, 198.000030, 298.251861, "Purchase");
PlayerTextDrawLetterSize(playerid, DealershipTD[16][playerid], 0.415666, 1.533630);
PlayerTextDrawTextSize(playerid, DealershipTD[16][playerid], 290.0, 15.0);
PlayerTextDrawAlignment(playerid, DealershipTD[16][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[16][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[16][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[16][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[16][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[16][playerid], 2);
PlayerTextDrawSetProportional(playerid, DealershipTD[16][playerid], 1);
PlayerTextDrawSetSelectable(playerid, DealershipTD[16][playerid], 1);
DealershipTD[17][playerid] = CreatePlayerTextDraw(playerid, 396.333312, 297.837005, "Cancel");
PlayerTextDrawLetterSize(playerid, DealershipTD[17][playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, DealershipTD[17][playerid], 470.0, 15.0);
PlayerTextDrawAlignment(playerid, DealershipTD[17][playerid], 1);
PlayerTextDrawColor(playerid, DealershipTD[17][playerid], -1);
PlayerTextDrawSetShadow(playerid, DealershipTD[17][playerid], 0);
PlayerTextDrawSetOutline(playerid, DealershipTD[17][playerid], 0);
PlayerTextDrawBackgroundColor(playerid, DealershipTD[17][playerid], 51);
PlayerTextDrawFont(playerid, DealershipTD[17][playerid], 2);
PlayerTextDrawSetProportional(playerid, DealershipTD[17][playerid], 1);
PlayerTextDrawSetSelectable(playerid, DealershipTD[17][playerid], 1);
}
IsValidVehicleModel(model)
{
if(model >= 400 && model <= 611)
{
return true;
}
return false;
}
Yes this is a module script so this is one pwn file out of all the modules so when I try to compile the main script it crashes and it was after recoding the above script.