2 Kills seguidos: Double Kill
3 Kills: Multi Kill
4 Kills: Ultra Kill
5 Kills: Fantastic
6 Kills: Unbelievable
7 Kills ou mais: Unbelievable+
/*
Sequкncia de Kills
(Estilo Combat Arms)
By - @Riichard
-------------------------------------
|2 Kills seguidos: Double Kill |
|3 Kills: Multi Kill |
|4 Kills: Ultra Kill |
|5 Kills: Fantastic |
|6 Kills: Unbelievable |
|7 Kills ou mais: Unbelievable+ |
-------------------------------------
*/
// ==== [Includes] ==== //
#include <a_samp> // SA:MP Team
// ==== [Variaveis] ==== //
new
PlayerText:tCombo[MAX_PLAYERS],
pKills[MAX_PLAYERS],
TempoTD[MAX_PLAYERS]
;
// ============================== //
public OnFilterScriptInit()
return print("[FilterScript - rKills] Carregado.");
public OnFilterScriptExit()
return print("[FilterScript - rKills] Descarregado.");
public OnPlayerConnect(playerid)
return CriarTextDraw(playerid), KillTimer(KillTimer(TempoTD[playerid])), 0;
public OnPlayerDisconnect(playerid)
return SumirTD(playerid), 0;
public OnPlayerDeath(playerid, killerid, reason)
{
pKills[playerid] = 0;
pKills[killerid] += 1;
KillTimer(TempoTD[playerid]);
if(pKills[killerid] == 2)
{
PlayAudioStreamForPlayer(killerid, "http://dc342.4shared.com/img/4281389484/b8662230/dlink__2Fdownload_2FCppyHaJi_3Ftsid_3D20131230-194334-ad8ffb73_26dsid_3D17lvwy.d92f45bf72d18c18cf89dafb47dbe3b3/preview.mp3");
PlayerTextDrawSetString(killerid, tCombo[killerid], "Double Kill");
PlayerTextDrawColor(killerid, tCombo[killerid], -2686721);
PlayerTextDrawShow(killerid, tCombo[killerid]);
if(TempoTD[killerid]) KillTimer(TempoTD[killerid]);
TempoTD[killerid] = SetTimerEx("SumirTD", 3500, false, "d", killerid);
}
if(pKills[killerid] == 3)
{
PlayAudioStreamForPlayer(killerid, "http://dc380.4shared.com/img/4281404928/9cf8b666/dlink__2Fdownload_2FMr8L1AMT_3Ftsid_3D20131230-195256-8ea57afd_26dsid_3D17lvwy.45d4101d1daef7600916c86a43302638/preview.mp3");
PlayerTextDrawSetString(killerid, tCombo[killerid], "Multi Kill");
PlayerTextDrawColor(killerid, tCombo[killerid], -65281);
PlayerTextDrawShow(killerid, tCombo[killerid]);
if(TempoTD[killerid]) KillTimer(TempoTD[killerid]);
TempoTD[killerid] = SetTimerEx("SumirTD", 3500, false, "d", killerid);
}
if(pKills[killerid] == 4)
{
PlayAudioStreamForPlayer(killerid, "http://dc544.4shared.com/img/4281406970/455d029a/dlink__2Fdownload_2FuEXYbOPa_3Ftsid_3D20131230-195405-a92b5017_26dsid_3D17lvwy.422e3569f7f7c0759c738343eb9123a5/preview.mp3");
PlayerTextDrawSetString(killerid, tCombo[killerid], "Ultra Kill");
PlayerTextDrawColor(killerid, tCombo[killerid], -7601921);
PlayerTextDrawShow(killerid, tCombo[killerid]);
if(TempoTD[killerid]) KillTimer(TempoTD[killerid]);
TempoTD[killerid] = SetTimerEx("SumirTD", 3500, false, "d", killerid);
}
if(pKills[killerid] == 5)
{
PlayAudioStreamForPlayer(killerid, "http://dc691.4shared.com/img/4281408708/ee864656/dlink__2Fdownload_2FAi2HfzLr_3Ftsid_3D20131230-195502-c130ba15_26dsid_3D17lvwy.d3fc5874202c8fa5ceae74c73d5367a2/preview.mp3");
PlayerTextDrawSetString(killerid, tCombo[killerid], "Fantastic");
PlayerTextDrawColor(killerid, tCombo[killerid], -16776961);
PlayerTextDrawShow(killerid, tCombo[killerid]);
if(TempoTD[killerid]) KillTimer(TempoTD[killerid]);
TempoTD[killerid] = SetTimerEx("SumirTD", 3500, false, "d", killerid);
}
if(pKills[killerid] >= 6)
{
PlayAudioStreamForPlayer(killerid, "http://dc591.4shared.com/img/4281409982/74a86f2f/dlink__2Fdownload_2FTdjyU9YB_3Ftsid_3D20131230-195543-b2bd8d_26dsid_3D17lvwy.97833465d64208589bc1343e8fd85951/preview.mp3");
if(pKills[killerid] == 6) PlayerTextDrawSetString(killerid, tCombo[killerid], "Unbelievable");
if(pKills[killerid] > 6) PlayerTextDrawSetString(killerid, tCombo[killerid], "Unbelievable+");
if(pKills[killerid] == 6) PlayerTextDrawColor(killerid, tCombo[killerid], -855637761);
if(pKills[killerid] > 6) PlayerTextDrawColor(killerid, tCombo[killerid], -1962934017);
PlayerTextDrawShow(killerid, tCombo[killerid]);
if(TempoTD[killerid]) KillTimer(TempoTD[killerid]);
TempoTD[killerid] = SetTimerEx("SumirTD", 3500, false, "d", killerid);
}
return 0;
}
// ================================================= //
forward SumirTD(playerid);
public SumirTD(playerid)
return PlayerTextDrawHide(playerid, tCombo[playerid]), pKills[playerid] = 0, KillTimer(KillTimer(TempoTD[playerid]));
forward CriarTextDraw(playerid);
public CriarTextDraw(playerid)
{
tCombo[playerid] = CreatePlayerTextDraw(playerid, 261.000000, 121.000000, "");
PlayerTextDrawFont(playerid, tCombo[playerid], 1);
PlayerTextDrawColor(playerid, tCombo[playerid], -2686721);
PlayerTextDrawSetOutline(playerid, tCombo[playerid], 1);
PlayerTextDrawSetProportional(playerid, tCombo[playerid], 1);
PlayerTextDrawSetShadow(playerid, tCombo[playerid], 1);
PlayerTextDrawLetterSize(playerid, tCombo[playerid], 0.680000, 2.500000);
pKills[playerid] = 0;
return 1;
}
if(pKills[killerid] == 6) PlayerTextDrawSetString(killerid, tCombo[killerid], "Unbelievable");
if(pKills[killerid] > 6) PlayerTextDrawSetString(killerid, tCombo[killerid], "Unbelievable+");
if(pKills[killerid] == 6) PlayerTextDrawColor(killerid, tCombo[killerid], -855637761);
if(pKills[killerid] > 6) PlayerTextDrawColor(killerid, tCombo[killerid], -1962934017);
if(pKills[killerid] == 6)
{
PlayerTextDrawSetString(killerid, tCombo[killerid], "Unbelievable");
PlayerTextDrawColor(killerid, tCombo[killerid], -855637761);
}
if(pKills[killerid] > 6)
{
PlayerTextDrawSetString(killerid, tCombo[killerid], "Unbelievable+");
PlayerTextDrawColor(killerid, tCombo[killerid], -1962934017);
}
Uma dъvida: quando a pessoa que fez, digamos Fantastic e morre, ele resta a sequкncia de kills?
|
public OnPlayerDeath(playerid, killerid, reason)
{
pKills[playerid] = 0;