06.08.2009, 01:32
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
Thanks
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; }