SA-MP Forums Archive
Why does this place me at blueberry farms? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why does this place me at blueberry farms? (/showthread.php?tid=300533)



Why does this place me at blueberry farms? - Dokins - 30.11.2011

I've specifically chose the position and it won't set it to it. I set all the camera pos etc by getting the co-ords manually.

pawn Код:
stock dohospital(playerid)
{
    if(Hospitalized[playerid] == 1)
    {
                ResetPlayerWeapons(playerid);
                SetPlayerHealth(playerid, 100);
                TogglePlayerControllable(playerid, false);
                SetPlayerPos(playerid,-319.1807, 1044.5845, 27.0152);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerInterior(playerid, 0);
                SetPlayerCameraPos(playerid, -315.1983, 1064.2436, 19.5937);
                SetPlayerCameraLookAt(playerid, -319.19,1050.22,20.3403);
                SendClientMessage(playerid, COLOUR_WHITE, "You are recovering in hospital.");
                SendClientMessage(playerid, COLOUR_WHITE, "You will be released shortly. ((Revenge killing is against the server rules)).");
        }
    return 1;
}



Re: Why does this place me at blueberry farms? - [MG]Dimi - 30.11.2011

Maybe re-ordering?

Try as this
pawn Код:
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,-319.1807, 1044.5845, 27.0152);



Re: Why does this place me at blueberry farms? - Rob_Maate - 30.11.2011

Question: Why are you setting the camera position? It will naturally spawn behind the player already, if you have got it elsewhere, use SetPlayerCameraBehindPlayer