07.10.2011, 17:31
Hi, I have made a command to enter any house which the player who typed the command is near. Here is the command.
It for some reason isn't teleporting me to the house coords, it just sends me in the air.
pawn Код:
CMD:enterhouse(playerid, params[])
{
for(new i=0; i < houses; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hX], HouseInfo[i][hY], HouseInfo[i][hZ]))
{
new string[128];
format(string, sizeof(string), "DEBUG: House Entered: X: %f, Y: %f, Z: %f, Interior: %d.", HouseInfo[i][hIntX], HouseInfo[i][hIntY], HouseInfo[i][hIntZ], HouseInfo[i][hInt]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerPos(playerid, HouseInfo[i][hIntX], HouseInfo[i][hIntY], HouseInfo[i][hIntZ]);
SetPlayerInterior(playerid, HouseInfo[i][hInt]);
}
}
return 1;
}