SA-MP Forums Archive
Bug with exit house to interior - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bug with exit house to interior (/showthread.php?tid=90073)



Bug with exit house to interior - Ben147 - 06.08.2009

i maded script that in somehouses when somebody write /exit he will spawn in other interior but i have a little bug
that only if im near the door its works but when i move away from the door and type /exit its exit to interior 0
Here is my script


Код:
if(strcmp(cmd, "/exit", true) == 0)
{
 if(IsPlayerConnected(playerid))
{
new h = PlayerInfo[playerid][pLocal];
new house = GetHouseID(playerid);
if (PlayerToPoint(3, playerid,HouseInfo[h][hExitx], HouseInfo[h][hExity], HouseInfo[h][hExitz]))
{
if(!rooms(house))
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
if(HouseInfo[h][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
}
else{
SetPlayerInterior(playerid,4);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez]);
PlayerInfo[playerid][pInt] = 4;
}	
return 1;
}
Thanks



Re: Bug with exit house to interior - Correlli - 06.08.2009

I really can't understand why you created another topic..?
Stick to the old one: http://forum.sa-mp.com/index.php?topic=114813.0