SA-MP Forums Archive
Car dealership help - 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: Car dealership help (/showthread.php?tid=527250)



Car dealership help - AdzeeH - 21.07.2014

On my server I have a /createcdveh which creates a car dealership vehicle and it says:

/createcdveh [price] [dealership id] [carmodelid] and when I sit in the car to do it, it says

ERROR: cdVehicles limit reached

Any ideas why?


Re: Car dealership help - Hanger - 21.07.2014

As it says, there are too many vehicles already. try to increase the limit via script you use, if it is possible, or get rid of some vehicles


Re: Car dealership help - Don_Cage - 21.07.2014

Show the code


Re: Car dealership help - AdzeeH - 22.07.2014

I believe this is the code you're wanting, also i've deleted most of the dealerships so I can re-place them but it still says this. I think there was about 3 dealerships left but they were in one spot of the map because they could of possibly not have been placed or coded yet.

Код:
new string[128], price, dealershipid, modelid;
    if(sscanf(params, "ddd", price, dealershipid, modelid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /createcdveh [price] [dealership] [modelid]");

    new Float:X,Float:Y,Float:Z,Float:A;
    GetPlayerPos(playerid,X,Y,Z);
    GetPlayerFacingAngle(playerid, A);
    new cdvehicleid = CreateCarDealershipVehicle(dealershipid, modelid, X, Y, Z, A, price);
    if(cdvehicleid == -1)
	{
        SendClientMessage(playerid, COLOR_GREY, "ERROR: cdVehicles limit reached.");
    }
    else
	{
        format(string, sizeof(string), " Car Dealership Vehicle created with ID %d.", cdvehicleid);
        SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    return 1;
}



Re: Car dealership help - AdzeeH - 22.07.2014

Would I change this code to like 200 or something? Instead of -1?

Код:
if(cdvehicleid == -1)



Re: Car dealership help - AdzeeH - 23.07.2014

Well?


Re: Car dealership help - AdzeeH - 23.07.2014

Someone please help?


Re: Car dealership help - IceBilizard - 23.07.2014

try

pawn Код:
if(cdvehicleid >= 200)
{
        SendClientMessage(playerid, COLOR_GREY, "ERROR: cdVehicles limit reached.");
}



Re: Car dealership help - William_McKnight - 23.07.2014

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
try

pawn Код:
if(cdvehicleid >= 200)
{
        SendClientMessage(playerid, COLOR_GREY, "ERROR: cdVehicles limit reached.");
}
According to Mr.IceBilizard you can set what ever you want at the following code to add a lot of vehicles as you want.

So, the total limit of vehicles is 2000.

pawn Код:
if(cdvehicleid >= VehicleLimitYouWant)  // Put what ever the limit you want in here but it should not exceed 2000. According to [URL="https://sampwiki.blast.hk/wiki/Limits"]this.[/URL]
{
        SendClientMessage(playerid, COLOR_GREY, "ERROR: cdVehicles limit reached.");
}



Re: Car dealership help - Don_Cage - 23.07.2014

Just as a side note. There can only be 2000 vehicles in the whole server. So if you have other vehicles than those you create with that cmd, I suggest you to put a limit below 2000