19.09.2010, 19:12
(
Последний раз редактировалось selEcT; 20.09.2010 в 12:43.
)
Hello!
I've got a problem with the houses. I save the houses with MySQL.
Some of them have the same interior, the houses 0-5 have the same interior p.e. But now, when I go into house 5, it works. But when I type /exit, I'm coming out at house 0, the first house with this interior! Why is this happen? That's the code to enter/exit:
What is the problem?
For the german guys:
http://forum.sa-mp.de/wbb/san-andrea...ht/#post432326
How it works correctly? I have also tested with the virtualworld from the house, it doesn't work..
Best regards
I've got a problem with the houses. I save the houses with MySQL.
Some of them have the same interior, the houses 0-5 have the same interior p.e. But now, when I go into house 5, it works. But when I type /exit, I'm coming out at house 0, the first house with this interior! Why is this happen? That's the code to enter/exit:
Код:
for(new i = 0; i < sizeof(HouseInfo); i++) { if(PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz])) //exit { SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pLocal] = 255; SetPlayerVirtualWorld(playerid,0); if(HouseInfo[i][hHel] == 1) { new Float:tempheal; GetPlayerHealth(playerid,tempheal); if(tempheal < 100.0) { SetPlayerHealth(playerid,100.0); } return 1; } } else if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) //enter { if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0) { SetPlayerInterior(playerid,HouseInfo[i][hInt]); SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); GameTextForPlayer(playerid, "~w~Welcome home", 5000, 1); PlayerInfo[playerid][pInt] = HouseInfo[i][hInt]; PlayerInfo[playerid][pLocal] = i; SetPlayerVirtualWorld(playerid,i); return 1; } else { return GameTextForPlayer(playerid, "~r~Closed", 5000, 1); } } }
For the german guys:
http://forum.sa-mp.de/wbb/san-andrea...ht/#post432326
How it works correctly? I have also tested with the virtualworld from the house, it doesn't work..
Best regards