Dealership problem
#1

lets say:
I made 2 Dealerships
Dealership 1 owner - can use /editcardealership
Dealership 2 owner - says "You do not own a car dealership
And the command is:
pawn Код:
CMD:editcardealership(playerid, params[])
{
    for(new d = 0 ; d < MAX_CARDEALERSHIPS; d++)
 {
        if(IsPlayerInRangeOfPoint(playerid, CarDealershipInfo[d][cdRadius], CarDealershipInfo[d][cdEntranceX], CarDealershipInfo[d][cdEntranceY], CarDealershipInfo[d][cdEntranceZ])) {
            if(IsPlayerOwnerOfCDEx(playerid, d))
   {
                SetPVarInt(playerid, "editingcd", d);
                SetPVarInt(playerid, "editingcdveh", -1);
                SetPVarInt(playerid, "editingcdvehpos", 0);
                SetPVarInt(playerid, "editingcdvehnew", 0);
                new listitems[] = "1 New Vehicle\n2 My Vehicles\n3 Upgrade\n4 Till";
                ShowPlayerDialog(playerid,DIALOG_CDEDIT,DIALOG_STYLE_LIST,"Choose an item to continue", listitems,"Select","Cancel");
                return 1;
            }
            else
   {
                SendClientMessageEx(playerid, COLOR_GREY, "You do not own that Car Dealership.");
                return 1;
            }
        }
    }
    SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You must be standing inside the radius of the Car Dealership.");
    return 1;
}
Reply
#2

Give this a shot:

pawn Код:
CMD:editcardealership(playerid, params[])
{
    for(new d = 0 ; d < MAX_CARDEALERSHIPS; d++)
    {
        if(IsPlayerInRangeOfPoint(playerid, CarDealershipInfo[d][cdRadius], CarDealershipInfo[d][cdEntranceX], CarDealershipInfo[d][cdEntranceY], CarDealershipInfo[d][cdEntranceZ]))
        {
            if(IsPlayerOwnerOfCDEx(playerid, d))
            {
                SetPVarInt(playerid, "editingcd", d);
                SetPVarInt(playerid, "editingcdveh", -1);
                SetPVarInt(playerid, "editingcdvehpos", 0);
                SetPVarInt(playerid, "editingcdvehnew", 0);
                new listitems[] = "1 New Vehicle\n2 My Vehicles\n3 Upgrade\n4 Till";
                ShowPlayerDialog(playerid,DIALOG_CDEDIT,DIALOG_STYLE_LIST,"Choose an item to continue", listitems,"Select","Cancel");
                return 1;
            }
            else return SendClientMessageEx(playerid, COLOR_GREY, "You do not own that Car Dealership.");
        }
    }
    SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You must be standing inside the radius of the Car Dealership.");
    return 1;
}
Reply
#3

It doesnt work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)