spawn selection camera - 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: spawn selection camera (
/showthread.php?tid=566719)
spawn selection camera -
wooolly - 07.03.2015
After the player selects there class, it goes onto spawn zone selection. I toggleplayerspectating to true, and set the camera pos and camera look at pos, but it doesn't work, it just looks at the sea (with a bridge, i think it's like the default location for a camera to look at, i think its at the 0,0 coords (center of map)) so the position maybe isn't worked?
It was working before, but I changed something in class selection and it broke it, so it can't be the camera positions surely :O?
Код:
if(gPlayerSpawnSelection[playerid] == SPAWN_ALL_SAINTS_HOSPITAL) {
SendClientMessage(playerid, COLOR_INFO, "All Sains Hospital camera pos set for spawn selection");
SetPlayerCameraPos(playerid,1234.7545,-1303.5400,38.6440);
SetPlayerCameraLookAt(playerid,1182.5050,-1323.1746,13.5791);
TextDrawShowForPlayer(playerid,txtAllSaintsHospital);
TextDrawShowForPlayer(playerid,txtASHdescription);
}
the sendclientmessage is just something I added for debugging purposes (to make sure it was getting called properly).
this is in OnPlayerSpawn:
Код:
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
TogglePlayerSpectating(playerid,true);
}
Re: spawn selection camera -
Cypress - 07.03.2015
SetPlayerCameraPos and SetPlayerCameraLookAt doesn't work when spectating. Use InterpolateCameraPos and InterpolateCameraLookAt..
https://sampwiki.blast.hk/wiki/InterpolateCameraPos
https://sampwiki.blast.hk/wiki/InterpolateCameraLookAt
Camera won't move if you put the same values of From:X, Y, Z to To:X, Y, Z, in case you don't know.
Re: spawn selection camera -
wooolly - 07.03.2015
Awesome! thanks duddddde +1 rep