15.07.2010, 21:17
Okay so I got 29 houses on my server right now just randomly made for my system I'm making, anyways I went in to test the store command & stuff I had made but then I discovered I only could enter house ID 0, all the others didn't react when I pressed F or ENTER
Heres the house code for when pressing F or Enter
If the problem could be somewhere else then please tell me, I've been looking in my loading part but can't seem to find any problems there, however neither can I here
Heres the house code for when pressing F or Enter
pawn Код:
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid,4.0,HouseInfo[i][SpawnX],HouseInfo[i][SpawnY],HouseInfo[i][SpawnZ]))
{
if(HouseInfo[i][Locked] == 1)
{
GameTextForPlayer(playerid,"~r~Locked",500,1);
return 1;
}
else
{
SetPlayerPos(playerid,Int[HouseInfo[i][Interior]][PosX],Int[HouseInfo[i][Interior]][PosY],Int[HouseInfo[i][Interior]][PosZ]);
SetPlayerInterior(playerid,Int[HouseInfo[i][Interior]][Interior]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][World]);
HouseEntered[playerid] = i;
printf("%s entered house id: %d",pname,HouseEntered[playerid]);
}
}
else if(IsPlayerInRangeOfPoint(playerid,5.0,Int[HouseInfo[HouseEntered[playerid]][Interior]][PosX],Int[HouseInfo[HouseEntered[playerid]][Interior]][PosY],Int[HouseInfo[HouseEntered[playerid]][Interior]][PosZ]))
{
SetPlayerPos(playerid,HouseInfo[HouseEntered[playerid]][SpawnX],HouseInfo[HouseEntered[playerid]][SpawnY],HouseInfo[HouseEntered[playerid]][SpawnZ]);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
printf("%s exited house id: %d",pname,HouseEntered[playerid]);
HouseEntered[playerid] = 9999;
}
}