19.10.2013, 21:32
I have a problem
If i make a vehicle dealership it works properly, but if my server gets restarted dealerships dissapear
I dont know where the problem is but i think its here
If i make a vehicle dealership it works properly, but if my server gets restarted dealerships dissapear
I dont know where the problem is but i think its here
pawn Код:
CMD:createdealership(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GREY, "You're not allowed to use this command.");
return 1;
}
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
new string[128], price, radius, message[64];
if(sscanf(params, "dds[64]", price, radius, message)) return SendClientMessage(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)
{
SendClientMessage(playerid, COLOR_GREY, "ERROR: Car Dealerships limit reached.");
}
else
{
format(string, sizeof(string), " Car Dealership created with ID %d.", dealershipid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
return 1;
}