[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
#2

BUMP!
Reply
#3

BUMP
Reply
#4

BUMP
Reply
#5

BUMP!
Reply
#6

DON'T BUMP THE THREAD FOR FUCKING REASON.
http://forum.sa-mp.com/announcement.php?f=12 - Rules
http://forum.sa-mp.com/forumdisplay.php?f=33 - Check your language board is there or not!

- I wish I can neg rep you for thread bumping....
Reply
#7

BUMP!
Reply
#8

There's a reason there's rules, try reading them for once.

And try explaining the problem more thoroughly, you haven't said what the problem is, just "how do i do this for tk points", i don't even know what "tk points" are supposed to be?
Or what you mean by "how do i do this for"?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)