25.01.2011, 12:08
i have put this in the callback
and these i have put'em in an other place dunno what do u guys call it
Код:
} public OnPlayerEnterDynamicCP(playerid, checkpointid) { for(new h = 0; h < sizeof(HouseInfo); h++) { if(HouseCheckpoint[h] == checkpointid) { new string[128]; if(HouseInfo[h][hOwned] == 1) { format(string, sizeof(string), "You are standing on %s's porch!", HouseInfo[h][hOwner]); SendClientMessage(playerid, COLOR_GREEN, string); } else { format(string, sizeof(string), "House for sale, Price: $%d", HouseInfo[h][hValue]); SendClientMessage(playerid, COLOR_GREEN, string); }
Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { for(new h = 0; h < sizeof(HouseInfo); h++) { if(HouseInfo[h][hOwned] == 0) { if(HouseInfo[h][hSetted] == 1) { if(IsPlayerInRangeOfPoint(i, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez])) { SetPlayerCheckpoint(i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 5.0); } } }