21.04.2012, 02:49
The code is creating confusion of a owned and unowned house. It's not even sometimes showing a gametext onpickuppickup
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[128];
for(new h=0; h<sizeof(HouseInfo); h++)
{
if(pickupid == housepickup[h])
{
if(HouseInfo[h][hOwned])
{
format(string,sizeof(string), "~w~%s~n~~w~%s~n~~y~%d", HouseInfo[h][hOwner], GetLocationArea(HouseInfo[h][hEnterX],HouseInfo[h][hEnterY],HouseInfo[h][hEnterZ]), h);
}
else
{
format(string,sizeof(string), "~w~[House For Sale]~n~Price:~r~$%d~n~~w~%s~n~~y~%d", HouseInfo[h][hPrice], GetLocationArea(HouseInfo[h][hEnterX],HouseInfo[h][hEnterY],HouseInfo[h][hEnterZ]), h);
}
GameTextForPlayer(playerid, string, 5000, 5);
return 1;
}
}
return 1;
}