[Help] TK Reaction
#1

How to do this for tk points as in this picture?

PHP код:
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,
    
boolxTestBusy

PHP код:
OnPlayerText()
{
    switch(
xTestBusy)
    {
        case 
true:
        {
            if(!
strcmp(xCharstextfalse))
            {
                new 
pName[MAX_PLAYER_NAME];
                
GetPlayerName(playeridpNamesizeof(pName));
                
format(stringsizeof(string), "{FF0000}[TK]{FFFFFF}Najbrzi je bio {FF0000}%s (%i){FFFFFF}i osvaja nagradu od $%d i sada ima {FF0000}%d {FFFFFF}TK POENA. »"pName,GetTimerInSeconds(GetTickCount()));
                
SendClientMessageToAll(GREENstring);
                
GivePlayerMoney(playeridxCash);
                
PlayerInfo[playerid][pExp] += 1;
                
xReactionTimer SetTimer("xReactionTest"TIMEE1);
                
xTestBusy false;
            }
        }
    } 
PHP код:
FUNCTION: xReactionProgress()
{
    switch(
xTestBusy)
    {
        case 
true:
        {
            new
                
string[128]
            ;
            
format(stringsizeof(string), "{C0C0C0}« Niko nije pobedio na {FFFFFF}'Reakcije-Test.' {C0C0C0}nov test pocinja za {FFFFFF}%d {C0C0C0}minuta. »", (TIMEE/60000));
            
SendClientMessageToAll(PURPLEstring);
            
xReactionTimer SetTimer("xReactionTest"TIMEE1);
            
xTestBusy false;
        }
    }
    return 
1;
}
FUNCTION: 
xReactionTest()
{
    new
        
xLength = (random(8) + 2),
        
string[128]
    ;
    
xCash = (random(1000) + 1000);
    
xScore = (random(1)+1);
    
format(xCharssizeof(xChars), "");
    
Loop(xxLengthformat(xCharssizeof(xChars), "%s%s"xCharsxCharacters[random(sizeof(xCharacters))][0]);
    
format(stringsizeof(string), "{FF0000}[TK]{FFFFFF}Ko prvi upise u cetu {FF0000}%s{FFFFFF} dobija %d$. TRENUTNI REKORD: %i sek."xCharsxCashxScore);
    
SendClientMessageToAll(PURPLEstring);
    
KillTimer(xReactionTimer);
    
xTestBusy true;
    
SetTimer("xReactionProgress"500000);
    return 
1;

Reply


Messages In This Thread
[Help] TK Reaction - by Markoni990 - 29.03.2015, 16:48
AW: [Help] TK Reaction - by Markoni990 - 29.03.2015, 18:03
AW: [Help] TK Reaction - by Markoni990 - 29.03.2015, 20:14
AW: [Help] TK Reaction - by Markoni990 - 29.03.2015, 21:36
AW: [Help] TK Reaction - by Markoni990 - 30.03.2015, 05:24
Re: [Help] TK Reaction - by KayJ - 30.03.2015, 05:29
AW: [Help] TK Reaction - by Markoni990 - 30.03.2015, 21:06
Re: [Help] TK Reaction - by CalvinC - 31.03.2015, 07:43

Forum Jump:


Users browsing this thread: 2 Guest(s)