04.06.2010, 12:18
Hi Manuel,
You could try comparing the position of the player in comparison to the exit position of the house. Then confirm they're virtual world corrisponds with the house one.
eg.
Give it a try, see what you can come up with.
Cheers, TJ
You could try comparing the position of the player in comparison to the exit position of the house. Then confirm they're virtual world corrisponds with the house one.
eg.
Код:
if(strcmp(cmd,"/exit",true) == 0) { for(new i=0; i<sizeof(HouseInfo); i++) { if(IsPlayerInRangeOfPoint(playerid,5.0,HouseInfo[i][hExitX],HouseInfo[i][hExitY],HouseInfo[i][hExitZ]) && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hVirtualWorld]) { SetPlayerPos(playerid,HouseInfo[i][hEntranceX],HouseInfo[i][hEntranceY],HouseInfo[i][hEntranceZ]); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); return 1; } } return 1; }
Cheers, TJ