[HELP!]Virtual World in GodFather!
#2

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.


Код:
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;

}
Give it a try, see what you can come up with.

Cheers, TJ
Reply


Messages In This Thread
[HELP!]Virtual World in GodFather! - by Manuel_Luna - 04.06.2010, 12:09
Re: [HELP!]Virtual World in GodFather! - by TTJJ - 04.06.2010, 12:18

Forum Jump:


Users browsing this thread: 3 Guest(s)