07.09.2010, 14:19
okay im trying to make a business script but i cant get this pickup to display the string when i pick it up!
and yes all the variables in the code do work properly, so any ideas as to why it doesnt display anything when i walk through the pickup?
pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid)
{
for(new C; C<BusinessCount+1; C++)
{
if(pickupid == 1272)
{
new str[150];
new Pname[24];
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]); //Makes the string for a business with no owner.
if(BusinessInfo[C][BusOwner] != -1)
{
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;
}