amm.. i dont have pawno here, so i will write an unindent code.
its should work.
it will spectate on a place you choose after death,
you can define the time, XYZ for looking / pos, message, and more.
Код:
// Simple DeathCamera - IST BarMaN, Bar Ohana, Israel.
#define DEF_CameraPos //X,Y,Z of the Camera Position
#define DEF_CameraLookAt //X,Y,Z of the place the camera should look into
#define DEF_CameraTime 5 // The time the camera will turned on, define it
#define DEF_MessageC 0xE6E6E6E6 // A color in hex type, the current is white.
#define DEF_MessageText "" // insert between the barckets your message
new bool:PlayerCamera[MAX_PLAYERS] = {false,...};
public OnPlayerDeath(playerid)
{
PlayerCamera[playerid] = true;
}
public OnPlayerSpawn(playerid)
{
if(PlayerCamera[playerid] == true)
{
SetPlayerCameraPos(playerid,DEF_CameraPos), SetPlayerCameraLookAt(playerid,DEF_CameraLookAt);
SetTimerEx("ResetPlayerCamera", (DEF_CameraTime * 1000), false, "i", playerid);
}
}
forward ResetPlayerCamera(playerid);
public ResetPlayerCamera(playerid)
{
SetCameraBehindPlayer(playerid), PlayerCamera[playerid] = false;
SendClientMessage(playerid,DEF_MessageC, DEF_MessageText);
}