26.06.2015, 13:24
Simply put...
Make a stock function
which loops through ALL your houses getting each EXIT X Y Z
( The position they stand on to EXIT the house )
Then
In your "lockhouse"
Put an if statement
example
OBVIOUSLY, You need to modify the code...
Because I just copied your EXTERIOR...
You need to get the INTERIOR coords
Make a stock function
which loops through ALL your houses getting each EXIT X Y Z
( The position they stand on to EXIT the house )
Then
In your "lockhouse"
Put an if statement
example
PHP код:
getStandingExit(playerid, Float:radius = 15.0) {
for(new i=0;i<sizeof(Houses);i++) {
if(IsPlayerInRangeOfPoint(playerid, radius, Houses[Player[i][House]][hExteriorX], Houses[Player[i][House]][hExteriorY], Houses[Player[i][House]][hExteriorZ])) {
return i;
}
}
return -1;
}
Because I just copied your EXTERIOR...
You need to get the INTERIOR coords