Posts: 36
Threads: 7
Joined: Nov 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?
Posts: 624
Threads: 110
Joined: Apr 2012
Reputation:
0
So you mean it doesnt Update the owners name? after you purchased it or others too?
Posts: 36
Threads: 7
Joined: Nov 2012
It doesn't update the owner name ;/
Posts: 759
Threads: 80
Joined: Oct 2012
Reputation:
0
b/idx w/e u name it isnt there a owner thing in the stock?
Posts: 36
Threads: 7
Joined: Nov 2012
Says the same and doesnt update
Posts: 759
Threads: 80
Joined: Oct 2012
Reputation:
0
can u post a copy of the loaddealership, savedealership thing plz
Posts: 624
Threads: 110
Joined: Apr 2012
Reputation:
0
In the enum is there the same plname?
Posts: 36
Threads: 7
Joined: Nov 2012
Quote:
Originally Posted by Imperor
In the enum is there the same plname?
|
In the enum there is 'pOwner[MAX_PLAYER_NAME]'
Posts: 624
Threads: 110
Joined: Apr 2012
Reputation:
0
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.