SA-MP Forums Archive
*** This topic title is not descriptive. - 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: *** This topic title is not descriptive. (/showthread.php?tid=390396)



*** This topic title is not descriptive. - mSlat3r - 05.11.2012

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?


Re: Whats wrong with this? - Laure - 06.11.2012

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


Re: Whats wrong with this? - mSlat3r - 06.11.2012

It doesn't update the owner name ;/


Re: Whats wrong with this? - Laure - 06.11.2012

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


Re: Whats wrong with this? - Glad2BeHere - 06.11.2012

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


Re: Whats wrong with this? - mSlat3r - 06.11.2012

Says the same and doesnt update


Re: Whats wrong with this? - Glad2BeHere - 06.11.2012

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


Re: Whats wrong with this? - Laure - 06.11.2012

In the enum is there the same plname?


Re: Whats wrong with this? - mSlat3r - 06.11.2012

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


Re: Whats wrong with this? - Laure - 06.11.2012

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.