24.04.2016, 15:06
I have this under OnPlayerEnterCheckPoint
But when I enter the server and I have serval house created it works only on house ID 1 and the others dosen't show a checkpoint
Код:
for(new idx=1; idx<MAX_HOUSES; idx++) { new zone[MAX_ZONE_NAME]; GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME); new str[256]; if(HouseInfo[idx][hLevel]) { if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[idx][hX], HouseInfo[idx][hY], HouseInfo[idx][hZ]) && !Housepicked[playerid]) { if(!strcmp("The State", HouseInfo[idx][hOwner], true)) { format(str, sizeof(str), "[%s %d] You are standing at the door of %s.", zone, idx, HouseInfo[idx][hOwner]); SendClientMessage(playerid, COLOR_GREEN, str); SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout), /knock, /ddo"); } else { format(str, sizeof(str), "This house is for sale: %d", HouseInfo[idx][hPrice]); SendClientMessage(playerid, COLOR_LIME, str); } Housepicked[playerid] = 1; } } }