07.08.2011, 02:07
Код:
public LoadPickups() { for(new h = 0; h < sizeof(HouseInfo); h++) { if(HouseInfo[h][hOwned] == 0) Housess[h] = CreateDynamicCP(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 2.2000, -1, -1, -1, 7.5); else if(HouseInfo[h][hOwned] == 1) HousesOwned[h] = CreateDynamicCP(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],2.2000, -1, -1, -1, 7.5); } } public OnPlayerEnterDynamicCP(playerid, checkpointid) { for(new h = 0; h < sizeof(HouseInfo); h++) { if (PlayerToPoint(2.5,playerid,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez])) { if(HouseInfo[h][hValue] != 0) { if(HouseInfo[h][hOwned] == 0) { new string[128]; SendClientMessage(playerid, COLOR_GREEN, "Would you like to buy this?"); format(string, sizeof(string), "Price: $%d", HouseInfo[h][hValue]); SendClientMessage(playerid, COLOR_GREEN, string); SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)"); SendClientMessage(playerid, COLOR_WHITE, "/buyhouse"); } else { if(HouseInfo[h][hRentabil] == 1) { new string[128]; new string2[128]; format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,HouseInfo[h][hOwner]); SendClientMessage(playerid, COLOR_GREEN, string); format(string2, sizeof(string2), "Available commands: /enter, /ds(hout), /knock, /doorbell, /breakin, /rentroom (Price: $%d)", HouseInfo[h][hRent]); SendClientMessage(playerid, COLOR_WHITE, string2); } else { new string[128]; format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,HouseInfo[h][hOwner]); SendClientMessage(playerid, COLOR_GREEN, string); SendClientMessage(playerid,COLOR_WHITE,"Available commands: /enter, /ds(hout), /knock, /doorbell, /breakin."); } } } } } }