[FilterScript] Sequкncia de Kills
#1

Sequкncia de Kills



- Descriзгo:
Um simples FilterScript, com poucas linhas.
Criei ela na base dos kills do Combat Arms, sendo eles:

pawn Код:
2 Kills seguidos: Double Kill
3 Kills: Multi Kill
4 Kills: Ultra Kill              
5 Kills: Fantastic              
6 Kills: Unbelievable          
7 Kills ou mais: Unbelievable+
Eu estava sem nada pra fazer e fazia algum tempo jб que nгo postava.
Eu tinha esse sistema б um tempo atrбs, quando estava criando o GameMode de TDM.
Mas no GameMode, estava bugado, pуis, eu nгo sabia muita coisa ainda.
Upei os sons do kill no 4shared na minha conta. Pуis nгo tenho conta no DropBox, entre outros lugares!
E hoje, peguei somente a textdraw do GameMode de TDM, e dei uma ajeitada.
Pelo meu ver, acredito que nгo exista algum bug, sу foi testado com 2 jogadores(eu e mais um) e nгo apresentou nenhum bug.
No vнdeo, a textdraw demorou para sumir, pуis eu coloquei tempo alto para testar.

- Vнdeo:
[ame]http://www.youtube.com/watch?v=p3SLAGqDI0E[/ame]

- FilterScript:
pawn Код:
/*
        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;
}

- OBS:
O som demora algum tempo para ser executado, entгo coloquei 3 segundos e meio para a textdraw desaparecer.


- Crйditos:

Criador/Ideia > @Riichard
Ajudante/Teste > #Coringa



Apesar de simples, espero que gostem!





Reply
#2

Tenho um sistema igual no meu GM .

Curti
Reply
#3

Bacana, parabйns.
Reply
#4

Quote:
Originally Posted by Tugamars
Посмотреть сообщение
Tenho um sistema igual no meu GM .

Curti
.

Quote:
Originally Posted by Delete_
Посмотреть сообщение
Bacana, parabйns.
vlw .
Reply
#5

Criativo, porйm sou mais PB!

+REP
Reply
#6

Simples mas bom!

Btw:

PHP код:
        if(pKills[killerid] == 6PlayerTextDrawSetString(killeridtCombo[killerid], "Unbelievable");
        if(
pKills[killerid] > 6PlayerTextDrawSetString(killeridtCombo[killerid], "Unbelievable+");
        if(
pKills[killerid] == 6PlayerTextDrawColor(killeridtCombo[killerid], -855637761);
        if(
pKills[killerid] > 6PlayerTextDrawColor(killeridtCombo[killerid], -1962934017); 
porque nгo:

PHP код:
        if(pKills[killerid] == 6)
        {
            
PlayerTextDrawSetString(killeridtCombo[killerid], "Unbelievable");
            
PlayerTextDrawColor(killeridtCombo[killerid], -855637761);
        }
        if(
pKills[killerid] > 6)
        {
            
PlayerTextDrawSetString(killeridtCombo[killerid], "Unbelievable+");
            
PlayerTextDrawColor(killeridtCombo[killerid], -1962934017);
        } 
Acho que nгo estou a ver mal...
Reply
#7

Combat Arms Modo ON hahaah! Mtoo Bom esse sistema ta de parabйns
Reply
#8

Muito bom richard parabйns si for possivel poste la no meu forum.
Reply
#9

Uma dъvida: quando a pessoa que fez, digamos Fantastic e morre, ele resta a sequкncia de kills?
Reply
#10

Quote:
Originally Posted by [BPW]Wesley
Посмотреть сообщение
Uma dъvida: quando a pessoa que fez, digamos Fantastic e morre, ele resta a sequкncia de kills?
Sim

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    pKills[playerid] = 0;
...

Criativo, muito bom..

Parabйns +2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)