exithouse command not working -
captainjohn - 02.04.2012
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).
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;
}
Re: exithouse command not working -
Reklez - 02.04.2012
Totally i see some wrong here
pawn Код:
GameTextForPlayer(playerid, "Loading, ExitHouseTimer, 4);
it must be like this
pawn Код:
GameTextForPlayer(playerid, word, time, fontstyle);
you also miss the " quote. so it will cause errors.
Re: exithouse command not working -
Chris1337 - 02.04.2012
try manually add the cordinates or make a callback for you remember player position i cant see getplayerpos just saying
Re: exithouse command not working -
captainjohn - 02.04.2012
It was supposed to be like this.
pawn Код:
GameTextForPlayer(playerid, "Loading", ExitHouseTimer, 4);
Also ExitHouseTimer is placed at the top of my script as.
pawn Код:
new ExitHouseTimer = 1000;
Re: exithouse command not working -
TzAkS. - 02.04.2012
I think that [HouseX] [HouseY] and [HouseY] is inside the house,becouse if you are inside of house and set virtualworld and interior to 0 the interior will disapear.
Lock for hInfo our HouseInfo and you will find HouseY,HouseX,HouseZ and you need to have and something like
HouseExitY,HouseExitX,HouseExitZ or hExit..
Re: exithouse command not working -
Chris1337 - 02.04.2012
Quote:
Originally Posted by TzAkS.
I think that [HouseX] [HouseY] and [HouseY] is inside the house,becouse if you are inside of house and set virtualworld and interior to 0 the interior will disapear.
Lock for hInfo our HouseInfo and you will find HouseY,HouseX,HouseZ and you need to have and something like
HouseExitY,HouseExitX,HouseExitZ or hExit..
|
stop posting just to increase post number because its exithouse comand its not saving coordinates
Re: exithouse command not working -
captainjohn - 02.04.2012
Fixed it by adding this.
pawn Код:
HouseID = APlayerData[playerid][CurrentHouse];
Thanks for the help anyway.