06.05.2013, 17:02
Car Dealership When i create dealership server laggs and also when buying cars from dealership it happens the same thing it laggs too
CMD:createdealership(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not allowed to use this command.");
return 1;
}
new string[128], price, radius, message[64];
if(sscanf(params, "dds[64]", price, radius, message)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /createdealership [price] [radius] [message]");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new dealershipid = CreateCarDealership(X, Y, Z, radius, price, message);
if(dealershipid == -1)
{
SendClientMessageEx(playerid, COLOR_GREY, "ERROR: Car Dealerships limit reached.");
}
else
{
format(string, sizeof(string), " Car Dealership created with ID %d.", dealershipid);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
return 1;
}