[FilterScript] killCamera - FPS Style - Simple FilterScript
#1

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 centerstyle 5 )
-> 
Killer: [ KillerName ] ( ID: [ KillerID ] ) <- ( In centerstyle 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.
Reply
#2

Screenies?
"- I haven't tested this script, but in my logic, it should works fine."
I don't trust you.
Reply
#3

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.
Reply
#4

Nice, seems good.

If I can I'll use this in a script then make a video for you guys.
Reply
#5

Wow killcam fot SAMP? testing this.
Reply
#6

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.
Reply
#7

Doesn't TogglePlayerSpectating(playerid, 0) already spawn the player?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)