13.03.2012, 09:16
This is code where pawn find loose indentation
Please help
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & 16 && !IsPlayerInAnyVehicle(playerid)) //If player pressed ENTER_VEHICLe and if he's not in an vehicle
{
for(new i = 0; i < MAX_HOUSES; i++) //Loop through all the houses
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir]) //Is player near house entrance, and if player is in interior of that house + virtual world
{
SetPlayerPos(playerid, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]);
SetPlayerInterior(playerid, HouseInfo[i][hInsideInt]);
SetPlayerVirtualWorld(playerid, HouseInfo[i][hInsideVir]);
//This will put the player IN the house
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hInsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hInsideVir]) //Same as the previous IsPlayerInRangeOfPoint, but now if the player is near the house exit+int+vir
{
SetPlayerPos(playerid, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]);
SetPlayerInterior(playerid, HouseInfo[i][hOutsideInt]);
SetPlayerVirtualWorld(playerid, HouseInfo[i][hOutsideVir]);
}
}
}
return 1;
}