18.11.2010, 07:04
Ok, i'v got this code but when you enter the pickup it doesn't display the gametext of the owners/price/sell price etc,
thanks for all help.
pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid)
{
for(new C; C<BusinessCount+1; C++)
{
if(pickupid == BusinessPickup[C])
{
new str[150];
if(BusinessInfo[C][BusOwner] == -1) format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn]);
if(BusinessInfo[C][BusOwner] != -1)
{
new Pname[24];
GetPlayerName(BusinessInfo[C][BusOwner], Pname, 24);
format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d~n~~w~Owner: %s(%d)", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn], Pname, BusinessInfo[C][BusOwner]);
GameTextForPlayer(playerid, str, 3000, 3);
}
}
}
return 1;
}