22.01.2014, 06:07
Try it
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) { new string[128]; for(new h = 0; h < sizeof(Houses); h++) { if(checkpointid == Houses[h][PickupID]) { if(Houses[h][Owned] == 0) { SendClientMessage(playerid, COLOR_GREEN, "Would you like to buy this?"); format(string, sizeof(string), "Price: $%d", Houses[h][HousePrice]); SendClientMessage(playerid, COLOR_GREEN, string); SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)"); SendClientMessage(playerid, COLOR_WHITE, "/buyhouse"); } if(Houses[h][Rentable] == 1) { new string2[128]; format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,Houses[h][Owner]); SendClientMessage(playerid, COLOR_GREEN, string); format(string2, sizeof(string2), "Available commands: /enter, /ds(hout), /rentroom (Price: $%d)", Houses[h][RentCost]); SendClientMessage(playerid, COLOR_WHITE, string2); } else { format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,Houses[h][Owner]); SendClientMessage(playerid, COLOR_GREEN, string); SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)"); } } } return 1; }