Dealership
#1

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


Messages In This Thread
Dealership - by Lunixx - 19.10.2013, 21:32
Re: Dealership - by DanishHaq - 19.10.2013, 22:24
Re: Dealership - by Lunixx - 20.10.2013, 08:44

Forum Jump:


Users browsing this thread: 1 Guest(s)