[Help] Little question about DOF2
#1

Okay, assuming I have the code below to save the server players' score, how do I create a loop that stores each score inside a variable, just like the name, EX:

PHP код:
// Code
    
new arquivo[70], sendername[MAX_PLAYER_NAME];
    
GetPlayerName(playeridsendernamesizeof(sendername));
    
format(arquivosizeof(arquivo), "Scores/%s.ini"sendername);
    if(
DOF2_FileExists(arquivo)){
        
SetPlayerScore(playeridDOF2_GetInt(arquivo"Score"));
    } else{
        
DOF2_CreateFile(arquivo);
        
DOF2_SetInt(arquivo"Score"0);
        
DOF2_SaveFile();
    } 
PHP код:

//stuff here
Then the loop returns me the following
ArrayScore
[1] = 24
ArrayName
[1] = So and so
ArrayScore
[2] = 53
ArrayName
[2] = So and so 
I do not know if I explained it well, but if anyone can help me, I'll be very grateful
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)