Car dealership help
#1

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?
Reply
#2

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
Reply
#3

Show the code
Reply
#4

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;
}
Reply
#5

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

Код:
if(cdvehicleid == -1)
Reply
#6

Well?
Reply
#7

Someone please help?
Reply
#8

try

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

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.");
}
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)