Please help with this! -
Flake. - 15.02.2010
hey could someone Make me a KillCam i have no idea how to do this xD
like when the player dies they spec a player for ten seconds then you can Press "Space" to skip it
thanks guys
Re: Please help with this! -
[gmR]BarMaN - 15.02.2010
It's so easy.
Just make a camera like OnPlayerRequestClass (SetPlayerCameraPos, etc.),
and set a timer after 5 seconds to destroy the player camera (SetCameraBehindPlayer);
PM me for any future help.
Re: Please help with this! -
Flake. - 15.02.2010
Quote:
Originally Posted by IST BarMaN
It's so easy.
Just make a camera like OnPlayerRequestClass (SetPlayerCameraPos, etc.),
and set a timer after 5 seconds to destroy the player camera (SetCameraBehindPlayer);
PM me for any future help.
|
Can you please give me a code?
Re: Please help with this! -
mansonh - 15.02.2010
You can do a camera, but why do that when you can spectate.
pawn Код:
new playerSpecTimer
[MAX_PLAYERS
] = {-1};
public OnPlayerDeath
(playerid, killerid, reason
){ TogglePlayerSpectating
(playerid,
1);
PlayerSpectatePlayer
(playerid, killerid
);
//spectate their killer playerSpecTimer
[playerid
] = SetTimerEx
("TogglePlayerSpectating",
10000, false,
"dd", playerid,
0);
}public OnPlayerKeyStateChange
(playerid, newkeys, oldkeys
){ //You can't choose space, see https://sampwiki.blast.hk/wiki/GetPlayerKeys if(newkeys
& KEY_SPRINT
&& playerSpecTimer
[playerid
]!=-1) { KillTimer
(playerSpecTimer
[playerid
]);
TogglePlayerSpectating
(playerid,
0);
}}
Re: Please help with this! -
Flake. - 15.02.2010
Quote:
Originally Posted by mansonh
You can do a camera, but why do that when you can spectate.
pawn Код:
new playerSpecTimer [MAX_PLAYERS ] = {-1}; public OnPlayerDeath (playerid, killerid, reason ){ TogglePlayerSpectating (playerid, 1); PlayerSpectatePlayer (playerid, killerid ); //spectate their killer playerSpecTimer [playerid ] = SetTimerEx ("TogglePlayerSpectating", 10000, false, "dd", playerid, 0); }public OnPlayerKeyStateChange (playerid, newkeys, oldkeys ){ //You can't choose space, see https://sampwiki.blast.hk/wiki/GetPlayerKeys if(newkeys & KEY_SPRINT && playerSpecTimer [playerid ]!=-1) { KillTimer (playerSpecTimer [playerid ]); TogglePlayerSpectating (playerid, 0); }}
|
yeah thats what i ment a spectate :P
thanks man this works
Re: Please help with this! -
mansonh - 15.02.2010
Now I am note sure about spectate and how it affects spawn, never really used spectate, so hope it works.
Re: Please help with this! -
[gmR]BarMaN - 15.02.2010
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);
}
Re: Please help with this! -
mansonh - 15.02.2010
Sorry to tell you you wasted your time but he wanted a spectating system ^^
Re: Please help with this! -
[gmR]BarMaN - 15.02.2010
Ohh. OK, but i didn't understand him.
Re: Please help with this! -
Flake. - 15.02.2010
lol thanks for trying :P
yes it works well thanks