09.01.2015, 11:05
how to make player doesn't have character/skin spawn, just put camera to a point? just like login mode, player doesn't see and have controlled char. I want to make it for deathcam and cutscene too.
forward camtrick(); public OnPlayerDeath(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerCameraPos(playerid, x, y, z+2); SetTimer("camtrick", 2500, false); // Set a timer of 2.5 seconds } public camtrick() { SetCameraBehindPlayer(playerid): }
you get the player's coordinates, set the camera to a higher altitude (z axys) and set it to face the player. I haven't tested what I did, but it should be something like this:
Код:
forward camtrick(); public OnPlayerDeath(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerCameraPos(playerid, x, y, z+2); SetTimer("camtrick", 2500, false); // Set a timer of 2.5 seconds } public camtrick() { SetCameraBehindPlayer(playerid): } |