08.01.2015, 21:00
Quote:
stock IsPlayerNearHouse(playerid) { for(new i = 0; i <= sizeof(hInfo); i++) { if(IsPlayerInRangeOfPoint(playerid, 5.0, hInfo[i][hPos][0], hInfo[i][hPos][1], hInfo[i][hPos][2])) { if(strcmp(GetNameEx(playerid), hInfo[i][hOwner], true) == 0) { printf("%i", i); return i; } } else if(!IsPlayerInRangeOfPoint(playerid, 5.0, hInfo[i][hPos][0], hInfo[i][hPos][1], hInfo[i][hPos][2])) { SendClientMessage(playerid, COLOR_GREY, "You are not in range of a house you own."); } } return 0; } |