Szerző Téma: Reakció teszt filterszkript  (Megtekintve 1673 alkalommal)

Reakció teszt filterszkript
« Dátum: 2014. Június 22. - 08:47:38 »
0 Show voters
Sziasztok!
Ma lefordítottam az angol fórumról egy reakció filterszkriptet magyarra..
Készítõ: RyDeR
Eredeti Link: http://forum.sa-mp.com/showthread.php?t=150274
----------------------------------------------------------------------------------------------
Funkciók:(Az eredeti téma alapján)
-Ha helyesen megválaszolod a tesztet,10000-30000 ig terjedõ pénzjutalmat kapsz + némi pontot.
-A teszt 2-8 karakterbõl áll,de ezt lehet módosítani
-A reakcióteszt 5 percenként indul,ez is módosítható.
-------------------------------------------------------------------------------------------------------------------------------------
Kód:
 /*
            Megjelenés:
                    » Reakció teszt FS
            Készítõ:
                    » » RyDeR «
            Utolsó újítás:
                    » 25/05/2010
            Változásnapló:
                    » v0.1a:
                                    - Kezdeti megjelenés
            Bugok:
                    » Nincsenek bugok
            Verzió:
                            » v0.1a
            Funkciók:
                            » /
            Készítõk:
                    » /
    */
    #include <a_samp>
    #if !defined Loop
    #define Loop(%0,%1) \\
            for(new %0 = 0; %0 != %1; %0++)
    #endif
    #if !defined function
    #define function%0(%1) \\
            forward%0(%1); public%0(%1)
    #endif
    #if !defined PURPLE
    #define PURPLE \\
        0xBF60FFFF
    #endif
    #if !defined GREEN
    #define GREEN \\
        0x94D317FF
    #endif
    #if !defined TIME
     #define TIME \\
          5*60*1000
    #endif
    new
            xCharacters[][] =
            {
                \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\",
                    \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\",
                \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\",
                    \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\",
                \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"
            },
            xChars[16] = \"\",
            xReactionTimer,
            xCash,
            xScore,
            bool: xTestBusy
    ;
    public OnFilterScriptInit()
    {
            xReactionTimer = SetTimer(\"xReactionTest\", TIME, 1);
            return 1;
    }
    public OnFilterScriptExit()
    {
            KillTimer(xReactionTimer);
            return 1;
    }
    public OnPlayerText(playerid, text[])
    {
            switch(xTestBusy)
            {
                case true:
                {
                            if(!strcmp(xChars, text, false))
                            {
                                new
                                    string[128],
                                    pName[MAX_PLAYER_NAME]
                                    ;
                                GetPlayerName(playerid, pName, sizeof(pName));
                                format(string, sizeof(string), \"« \\%s\\\" megnyerte a reakciótesztet. »\", pName);
                                SendClientMessageToAll(GREEN, string);
                                format(string, sizeof(string), \"« Kaptál %d $-t és %d pontot. »\", xCash, xScore);
                                SendClientMessage(playerid, GREEN, string);
                                GivePlayerMoney(playerid, xCash);
                                SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
                                xReactionTimer = SetTimer(\"xReactionTest\", TIME, 1);
                                xTestBusy = false;
                            }
                    }
            }
            return 1;
    }
    function xReactionProgress()
    {
       switch(xTestBusy)
            {
                case true:
                {
                        new
                            string[128]
                            ;
                        format(string, sizeof(string), \"« Senki nem nyerte meg a reakciótesztet. Új 5 perc mulva indul. »\");
                        SendClientMessageToAll(PURPLE, string);
                        xReactionTimer = SetTimer(\"xReactionTest\", TIME, 1);
           }
            }
       return 1;
    }
    function xReactionTest()
    {
            new
                    xLength = (random(8) + 2),
                    string[128]
            ;
            xCash = (random(10000) + 30000);
            xScore = (random(2)+1);
            format(xChars, sizeof(xChars), \"\");
            Loop(x, xLength) format(xChars, sizeof(xChars), \"%s%s\", xChars, xCharacters[random(sizeof(xCharacters))][0]);
            format(string, sizeof(string), \"« Reakció teszt! Aki elõsször beírja ezt: %s nyer %d$-t és %d pontot. »\", xChars, xCash, xScore);
            SendClientMessageToAll(PURPLE, string);
            KillTimer(xReactionTimer);
            xTestBusy = true;
            SetTimer(\"xReactionProgress\", 370000, 0);
            return 1;
    }

 
Letöltés: http://www.solidfiles.com/d/e1411e0b2d/react.pwn
A filterszkript 100% ban mûködik,teszteltem
« Utoljára szerkesztve: 2014. Június 22. - 09:50:00 írta DragonSoul »

Reakció teszt filterszkript
« Válasz #1 Dátum: 2014. Június 22. - 09:35:30 »
0 Show voters
Tesztelted is mûködik?

Reakció teszt filterszkript
« Válasz #2 Dátum: 2014. Június 22. - 09:48:56 »
0 Show voters
100% ban mûködik.Teszteltem

Nem elérhető Geno

  • 209
    • Profil megtekintése
Reakció teszt filterszkript
« Válasz #3 Dátum: 2014. Június 22. - 13:41:40 »
0 Show voters
Nem rossz, de szerintem a Hivatalos fórumról áthozott scriptekhez kellet volna nyitni.
« Utoljára szerkesztve: 2014. Június 22. - 13:46:19 írta Geno »

Reakció teszt filterszkript
« Válasz #4 Dátum: 2014. Június 23. - 09:32:20 »
0 Show voters
Már KaRi áthelyezte
sry még kezdõ vagyok a fórumon

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal