SA-MP Forums Archive
spectating problem - 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: spectating problem (/showthread.php?tid=481147)



spectating problem - xyzcod2 - 14.12.2013

onplayerconnect i set player spectating but camera pos and camera look at dont work

code:

Код:
TogglePlayerSpectating(playerid, 1);
  	    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
 	    LogRegTimer1[playerid] = SetTimerEx("Login1", 300, false, "i", playerid);
 	    SetPlayerPos(playerid, 2173.0852, 2067.2083, 27.4533);
 	    SetPlayerCameraPos(playerid, -349.3969, 1868.1582, 48.4176);
 	    SetPlayerCameraLookAt(playerid, -328.3499, 1860.9808, 45.2828);



Re: spectating problem - xyzcod2 - 14.12.2013

BUMP!!


Re: spectating problem - arakuta - 14.12.2013

Try to use a timer, with something like 300ms delay to activate that camera mode.

pawn Код:
// OnPlayerConect
SetTimerEx("SetupCamera",300,false,"d",playerid);

forward SetupCamera(playerid);

public SetupCamera(playerid)
{
    // your camera things...
    return 1;
}