View difference between Paste ID: Ungezjb8 and 6ZBbQ5NK
SHOW: | | - or go back to the newest paste.
1
/*
2
	Subject: Camera Kill Include
3
	Author: GTAItsMe
4
	Date: 17:58 16/12/2012
5
*/
6
7
#include <a_samp>
8
9
new bool:All;
10
new bool:Player[MAX_PLAYERS];
11
12
stock ToggleCamreaKillToAll(bool:toggle)return All = toggle;
13
stock ToggleCameraKillToPlayer(playerid, bool:toggle)return Player[playerid] = toggle;
14
15
public OnPlayerDeath(playerid, killerid, reason)
16
{
17
	if((All == true || Player[playerid] == true) && killerid != INVALID_PLAYER_ID)
18
	{
19
	    TogglePlayerSpectating(playerid, true);
20
	    PlayerSpectatePlayer(playerid, killerid);
21
	    new time = GetTickCount();
22
	    static idx;
23
	    static str[128];
24
	    static n[MAX_PLAYER_NAME];
25
	    GetPlayerName(killerid, n, MAX_PLAYER_NAME);
26-
		while(GetTickCount() - time <= time)
26+
		while(GetTickCount() - time > 0)
27
		{
28
		    idx++;
29
		    format(str, 128, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~] Camera Kill: ~r~ %s ~y~ ]~n~~n~] Spawn in ~r~%i~y~ Seconds~ ]", n, idx);
30
		    GameTextForPlayer(playerid, str, idx, 4);
31
		}
32
	}
33
	return true;
34
}