06.05.2013, 09:44
I've been searching all over the internett and can't find out how i can script it. I doesn't want the /enter /exit when i enter or exit the house. I want to press space when i enter the house. Can someone help me :/
if(GetPlayerVirtualWorld(playerid) == 0)
{
for(new i; i < MAX_HOUSES; i++)
{
if(IsPlayerInRange(playerid, 3, 3, HouseInfo[i][POS][0], HouseInfo[i][POS][1], HouseInfo[i][POS][2]))
{
SetPlayerVirtualWorld(playerid, HouseInfo[i][World]);
SetPlayerInterior(playerid, HouseInfo[i][Int]);
SetPlayerPos(playerid, HouseInfo[i][iPOS][0], HouseInfo[i][iPOS][1], HouseInfo[i][iPOS][2]);
break;
}
}
}
if(GetPlayerVirtualWorld(playerid) != 0)
{
for(new i; i < MAX_HOUSES; i++)
{
if(IsPlayerInRange(playerid, 3, 3, HouseInfo[i][iPOS][0], HouseInfo[i][iPOS][1], HouseInfo[i][iPOS][2]) && GetPlayerVirtualWorld(playerid) == HouseInfo[i][World])
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HouseInfo[i][POS][0], HouseInfo[i][POS][1], HouseInfo[i][POS][2]);
break;
}
}
}