[HELP]Reaction TK Points
#1

Hey I would like to make a reaction tk points but that we preserve the name of the player and tk points it should be this way as a picture
PHP код:
switch(xTestBusy)
    {
        case 
true:
        {
            if(!
strcmp(xCharstextfalse))
            {
                
//new
                   //string[456],
                
new pName[MAX_PLAYER_NAME]
                ;
                
GetPlayerName(playeridpNamesizeof(pName));
                
format(stringsizeof(string), "{FF0000}[TK]{FFFFFF}Najbrzi je bio {FF0000}%s\" {FFFFFF}i osvaja nagradu od $%d i sada ima {FF0000}%d {FFFFFF}TK POENA. »"pName,xCash,xScore);
                
SendClientMessageToAll(COLOR_GRAD1string);
                
format(stringsizeof(string), "{00FFFF}« Dobili ste $%d»"xCash);
                
SendClientMessage(playeridCOLOR_GRAD1string);
                
GivePlayerMoney(playerid1500);
                
//PlayerInfo[playerid][pExp] += 1;
                
SetPlayerScore(playeridGetPlayerScore(playerid) + xScore);
                
xReactionTimer SetTimer("xReactionTest"TIMEE1);
                
xTestBusy false;
                
//SavePlayer(playerid);
            
}
        }
    } 
PHP код:
FUNCTION: xReactionTest()
{
    new
        
xLength = (random(8) + 2),
        
string[128]
    ;
    
xCash = (random(574) + 228);
    
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."xCharsxCashGetTimerInSeconds(GetTickCount()),xScore);
    
SendClientMessageToAll(PURPLEstring);
    
KillTimer(xReactionTimer);
    
xTestBusy true;
    
SetTimer("xReactionProgress"500000);
    return 
1;

Reply
#2

BUMP
Reply
#3

BUMP
Reply
#4

There are many different file-writing systems (sa:mp's default, y_ini, dini, et cetra). Look up more information and tutorials to learn how to save and load info in/from a file.
Reply
#5

enum pInfo
{
pTKPoint,
}
PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#6

BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)