07.08.2016, 17:36
Код:
if(strcmp(cmdtext, "/lockhouse", true) == 0) { for(new i = 0; i <sizeof(HouseInfo); i++) { if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][HouseExitX], HouseInfo[i][HouseExitY], HouseInfo[i][HouseExitZ]) || IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][HouseEnterX], HouseInfo[i][HouseEnterY], HouseInfo[i][HouseEnterZ])) { new name[MAX_PLAYER_ANME]; GetPlayerName(playerid, name, sizeof(name)); if(strcmp(HouseInfo[i][HouseOwnerName], name, true) == 0) { if(HouseInfo[i][HouseLocked] == 0) { HouseInfo[i][HouseLocked] = 1; SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}Къщата вече е заключена за посетители!"); } else { HouseInfo[i][HouseLocked] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}Къщата вече е отключена за посетители!"); } return 1; } else { SendClientMessage(playerid, COLOR_GREY, "Трябва да сте собственик на къщата!"); return 1; } } } return 1; }