02.04.2012, 07:33
Hello everyone.
I made this command and for some reason it doesn't work, instead of exiting you outside your house, it takes you to the co-ordinates 0.00, 0.00, 0.00 (BlueBerry Acres).
I made this command and for some reason it doesn't work, instead of exiting you outside your house, it takes you to the co-ordinates 0.00, 0.00, 0.00 (BlueBerry Acres).
pawn Код:
COMMAND:exithouse(playerid, params[])
{
new HouseID;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
// Set the position of the player at the entrance of his house
SetPlayerPos(playerid, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]);
APlayerData[playerid][CurrentHouse] = 0;
if (ExitHouseTimer > 0)
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading, ExitHouseTimer, 4);
SetTimerEx("House_ExitTimer", ExitHouseTimer, false, "ii", playerid, HouseID);
}
return 1;
}