SA-MP Forums Archive
Dealership - 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: Dealership (/showthread.php?tid=470832)



Dealership - Lunixx - 19.10.2013

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



Re: Dealership - DanishHaq - 19.10.2013

pawn Код:
CreateCarDealership
Where is this coming from? A function that you have? An include file? If it's an include file, the best thing to do would be to post in that topic you got the include file from, or PM the author.


Re: Dealership - Lunixx - 20.10.2013

This is from Script. It isn't include file