Bug with exit house to interior
#1

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
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)