08.09.2010, 02:21
Okay I got this straight for [HiC]TheKiller's tutorial there were alot of problems in that tutorial, I have fixed up most of them but now theres one left and I have been working all week to try and fix it with no luck.
Anyone help me out?
When I walk into a pickup it displays nothing
Anyone help me out?
pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid) //If you have one of these add the stuff in this to your one =]
{
for(new C; C<BusinessCount; C++)
{
if(pickupid == BusinessPickup[C]) //Checks if the pickup is for a business
{
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]); //Makes the string for a business with no owner.
if(BusinessInfo[C][BusOwner] != -1)
{
new Pname[24]; //Creates player name variable
GetPlayerName(BusinessInfo[C][BusOwner], Pname, 24); //Gets player name
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]);
SendClientMessage(playerid,0x00FF00AA,str);
}
}
}
return 1;
}