killCamera - FPS Style - Simple FilterScript -
Basicz - 16.08.2011
Hi, I present this simple filterscript ( I got the idea from Z-R0's "Who Killed Me" + Lorenc_ 's server ).
After Z-R0's "Who Killed Me?" filterscript link is down, and peoples are asking for it, I got an idea to create a new one.
This script will spectate the player who has killed him, for 3 seconds.
So here is the script
pawn Код:
/*
[ filterScript ] Kill camera.
*/
#define FILTERSCRIPT
#include < a_samp >
forward unSpectate( playerid );
public OnPlayerDeath( playerid, killerid, reason )
{
if ( killerid != INVALID_PLAYER_ID )
{
new
szGameTextStr[ 128 ],
killerName[ 24 ]
;
GetPlayerName( killerid, killerName, 24 );
TogglePlayerSpectating( playerid, 1 );
if ( IsPlayerInAnyVehicle( killerid ) )
{
PlayerSpectateVehicle( playerid, GetPlayerVehicleID( killerid ) );
}
else
{
PlayerSpectatePlayer( playerid, killerid );
}
format( szGameTextStr, 128, "~w~~n~killCamera~n~~>~Killer: %s ( ID: %i )~<~", killerName, killerid );
GameTextForPlayer( playerid, szGameTextStr, 3000, 5 );
SetTimerEx( "unSpectate", true, 3000, "i", playerid );
}
return 1;
}
public unSpectate( playerid )
return TogglePlayerSpectating( playerid, 0 ), SpawnPlayer( playerid );
P.S: Crushed indentation, I know.
Screenshots :
- My internet is laggy ( extreme, 100kb download = 1 mins ) ATM, instead, I will show you how it looks.
PHP код:
killCamera ( In center, style 5 )
-> Killer: [ KillerName ] ( ID: [ KillerID ] ) <- ( In center, style 5 )
https://sampwiki.blast.hk/wiki/GameTextStyle
With a white colour,
using gametext style '5',
"~w~~n~killCamera~n~~>~Killer: %s ( ID: %i )~<~".
~w~ = White
~n~ = New line
~>~ = An arrow key ( right )
~<~ = An arrow key ( left )
- I haven't tested this script, but in my logic, it should works fine.
- Please report any bugs if you find.
Re: killCamera - FPS Style - Simple FilterScript -
FireCat - 16.08.2011
Screenies?
"- I haven't tested this script, but in my logic, it should works fine."
I don't trust you.
Re: killCamera - FPS Style - Simple FilterScript -
Zh3r0 - 16.08.2011
Quote:
Originally Posted by FireCat
Screenies?
"- I haven't tested this script, but in my logic, it should works fine."
I don't trust you.
|
There is nothing to watch, the code is telling you everything.
He also told you what it does, what screenshots do you still need?
Good job, nice idea.
Re: killCamera - FPS Style - Simple FilterScript -
X3nZ - 16.08.2011
Nice, seems good.
If I can I'll use this in a script then make a video for you guys.
Re: killCamera - FPS Style - Simple FilterScript -
Da' J' - 09.02.2012
Wow killcam fot SAMP?

testing this.
AW: killCamera - FPS Style - Simple FilterScript -
NaS - 12.02.2012
Nice and simple

But be aware of the fact that the spectated player could be killed too, you should interrupt the spectating there.
Strange things happen with spectating, if you're using it wrong. (Spectating a dead player in this case is a wrong thing)!
I did a KillCamera like this before and had issues with it at that point.
Re: killCamera - FPS Style - Simple FilterScript - suhrab_mujeeb - 12.02.2012
Doesn't TogglePlayerSpectating(playerid, 0) already spawn the player?