Reaction Test Poblem?? [I Give +REP]
#1

Ok i have this reaction test but i have a problem. The problem is that when te reaction test is over you can stll win it.
pawn Код:
#include <a_samp>
#define blue2                   0x0247FEFF

#if !defined function
#define function%0(%1) \
    forward%0(%1); public%0(%1)
#endif

#if !defined Loop
#define Loop(%0,%1) \
    for(new %0 = 0; %0 != %1; %0++)
#endif

#if !defined TIME
#define TIME \
    180000
#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
;

function xReactionProgress()
{
    switch(xTestBusy)
    {
        case true:
        {
            new
                string[128]
            ;
            format(string, sizeof(string), "[REACTION TEST] : No One Manage To Win The Reaction Test. New One Starting In %d Minutes.", (TIME/60000));
            SendClientMessageToAll(blue2, string);
            xReactionTimer = SetTimer("xReactionTest", TIME, 1);
        }
    }
    return 1;
}

function xReactionTest()
{
    new
        xLength = (random(5) + 3),
        string[128]
    ;
    xCash = (random(1000) + 9000);
    xScore = (random(2) + 3);
    format(xChars, sizeof(xChars), "");
    Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s%s%s%s%s%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0], xCharacters[random(sizeof(xCharacters))][0], xCharacters[random(sizeof(xCharacters))][0], xCharacters[random(sizeof(xCharacters))][0], xCharacters[random(sizeof(xCharacters))][0], xCharacters[random(sizeof(xCharacters))][0], xCharacters[random(sizeof(xCharacters))][0]);
    format(string, sizeof(string), "[REACTION TEST] : Who First Types %s Wins $%d With %d Score!", xChars, xCash, xScore);
    SendClientMessageToAll(blue2, string);
    KillTimer(xReactionTimer);
    xTestBusy = true;
    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), "[REACTION TEST] : %s (%i) Has Won And Earned $%d With %d Score!", pName, playerid, xCash, xScore);
                SendClientMessageToAll(blue2, string);
                GivePlayerMoney(playerid, xCash);
                SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
                xReactionTimer = SetTimer("xReactionTest", TIME, 1);
                xTestBusy = false;
                return false;
            }
            return true;
        }
    }
    return 0;
}
Reply
#2

You can use Ryder reaction test its better,
https://sampforum.blast.hk/showthread.php?tid=150274
Reply
#3

No i want to use this one. Can anyone help me
Reply
#4

tell us whats happening.. or just debug the shit out of it.... ryders looks the same to me
Reply
#5

Did you join the server as a [GM] i mean admin or just player because i got similar problem like when i join my server as a admin i still win when i don't type anything but others can't, in your one is it same?
Reply
#6

Quote:
Originally Posted by mastermax7777
Посмотреть сообщение
tell us whats happening.. or just debug the shit out of it.... ryders looks the same to me
Ryder one is like still admin can win but others can't when they don't type anything
Reply
#7

Look every one has the same problem. when it says No One Manage To Win The Reaction Test.
I can still type the word it was and i win. And this is the ryders i modifyed it a little!
Reply
#8

xTestBusy = true;
Paste before killing time? Or make it false.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)