Virtualworld & Houses.
#1

Hello, I have this command (from LARP mod):

pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
            {
              if(IsPlayerConnected(playerid))
                {
                    for(new i = 0; i < sizeof(HouseInfo); i++)
                    {
                            if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
                            {
                            SetPlayerInterior(playerid,0);
                                SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
                                PlayerInfo[playerid][pInt] = 0;
                                PlayerInfo[playerid][pLocal] = 255;
                                SetPlayerVirtualWorld(playerid,0);
                                TogglePlayerControllable(playerid, 0);

                              if(HouseEntered[playerid] == i)
                              {
                                        SetPlayerInterior(playerid,0);
                                        SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
                                        PlayerInfo[playerid][pInt] = 0;
                                        PlayerInfo[playerid][pLocal] = 255;
                                        SetCameraBehindPlayer(playerid);
                                        SetPlayerVirtualWorld(playerid,0);
                                        HouseEntered[playerid] = 255;
                                        if(HouseInfo[i][hHel] == 1)
                                        {
                                            new Float:tempheal;
                                            GetPlayerHealth(playerid,tempheal);
                                            if(tempheal < 100.0)
                                            {
                                                SetPlayerHealth(playerid,100.0);
                                            }
                                        }
                                    }
                                    return 1;
                                }
                            }
                        }
                }
Now, that problem is that when I type /exit sometimes it teleports me to another house.
I don't see any GetPlayerVirtualWorld function here and I don't know what the problem is.
Thanks in advance.

Reply


Messages In This Thread
Virtualworld & Houses. - by Nakash - 09.04.2010, 04:29
Re: Virtualworld & Houses. - by Grim_ - 09.04.2010, 05:55
Re: Virtualworld & Houses. - by Nakash - 09.04.2010, 08:35
Re: Virtualworld & Houses. - by Grim_ - 09.04.2010, 08:49
Re: Virtualworld & Houses. - by Nakash - 09.04.2010, 09:05
Re: Virtualworld & Houses. - by woot - 09.04.2010, 11:35

Forum Jump:


Users browsing this thread: 1 Guest(s)