*** This topic title is not descriptive.
#1

pawn Код:
format(string, sizeof(string), "{4BB325}Vehicle Dealership\n{C4C920}[Owner: %s]\n[ID: %d]", plname, b);
        UpdateDynamic3DTextLabelText(CarDealer[b][pLabel], COLOR_WHITE, string);
This is under this CMD:

pawn Код:
CMD:buydealer(playerid)
{
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
    new string[128];
    for(new b = 0; b < MAX_CARDEALERSHIPS; b++)
    if(IsPlayerInRangeOfPoint(playerid, 3.0, CarDealer[b][pVehicleSpawnX], CarDealer[b][pVehicleSpawnY], CarDealer[b][pVehicleSpawnZ]))
     {
        if(PlayerInfo[playerid][pDealerKey] == -1)
        {
        CarDealer[b][pOwner] = plname;
        format(string, sizeof(string), "You have just purchased a Dealership! (ID: %d)", b);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "{4BB325}Vehicle Dealership\n{C4C920}[Owner: %s]\n[ID: %d]", plname, b);
        UpdateDynamic3DTextLabelText(CarDealer[b][pLabel], COLOR_WHITE, string);
        PlayerInfo[playerid][pDealerKey] = b;
        }
        else SendClientMessage(playerid, COLOR_GRAD2, "You already own a Dealership!");
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "You are not at a dealership purchase point!");
    return 1;
}
It says I have bought the dealership and the ID so it must know its the right one, but it doesn't update?
Reply
#2

So you mean it doesnt Update the owners name? after you purchased it or others too?
Reply
#3

It doesn't update the owner name ;/
Reply
#4

Well.Try this one
Код:
format(string, sizeof(string), "{4BB325}Vehicle Dealership\n{C4C920}[Owner: %s]\n[ID: %d]", plname, b);
        DealerInfo[dealeridhere][dText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, DealerInfo[idx][dX], DealerInfo[idx][dY], DealerInfo[idx][dZ]+0.3, 15);
        UpdateDynamic3DTextLabelText(CarDealer[b][pLabel], COLOR_WHITE, string);
Update the codes to the one of your script i expect you'll do it.And be sure you have added new DealerInfo[MAX_DEALERS][dealerInfo];
Reply
#5

b/idx w/e u name it isnt there a owner thing in the stock?
Reply
#6

Says the same and doesnt update
Reply
#7

can u post a copy of the loaddealership, savedealership thing plz
Reply
#8

In the enum is there the same plname?
Reply
#9

Quote:
Originally Posted by Imperor
Посмотреть сообщение
In the enum is there the same plname?
In the enum there is 'pOwner[MAX_PLAYER_NAME]'
Reply
#10

So do DealerInfo[idx][pOwner] rather than plname.And idk if you got DealerInfo or idx may be they can be modified so write there what ever you have and might be dealerid rather than idx.Hope you will manage it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)