28.07.2013, 12:53
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK) // Key ENTER
{
for(new i=0; i < sizeof(HouseInfo); i++) //here the variable of the HouseInfo
{
if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[i][hEX], HouseInfo[i][hEY], HouseInfo[i][hEZ])) //hEX, hEY, hEZ are the coordinate of the house entrance
{
if(HouseInfo[i][hLocked] == 0) // the variable if the house is closed or not
{
SetPlayerPos(playerid, HouseInfo[i][hExX], HouseInfo[i][hExY], HouseInfo[i][hExZ]); // hExX, hExY, hExZ are the coordinates you will be set that are the coordinates of the Exit point from the house
}
}
}
}
return 1;
}
Plz i want fix now