[Pedido] Arrumar
#1

bom eu tava olhando um tuto e tentando fazer nem sei se tб certo mais agr eu preciso fazer que esse sistema crie a a pasta e salve o .ini alguem poderia me ajudar?
PHP код:
public OnPlayerConnect(playerid)
{
    new 
file[64],nome[24],string[128];
    
GetPlayerName(playeridnome,sizeof(nome));
    
GetPlayerName(playeridfile,sizeof(file));
    
format(file,sizeof(file),DOF2_File(file));
    if(
DOF2_FileExists(file))
    {
        
format(stringsizeof(string), "Bem Vindo Novamente %s \n Digite Sua Senha Para Se Logar !"nome);
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"BLS - Login",string,"Logar","Sair");
    }
    else
    {
        
format(stringsizeof(string), "Olб %s, Vocк Nгo й Registrado(a)\nDigite Uma Senha Para Registrar !"nome);
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"BLS - Registro",string,"Registrar","Sair");
    }
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_REGISTER:
        {
            if(!
responseKick(playerid); 
            if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,"BLS - Registro","Digite Sua Senha Para\n Se Registrar ","Registrar","Sair");
            if(
response)
            {
                new 
file[64]; 
                
GetPlayerName(playerid,file,sizeof(file)); 
                
format(file,sizeof(file),DOF2_File(file));
                
DOF2_CreateFile(fileinputtext);
                
DOF2_SetInt(file"Kills"0); 
                
DOF2_SetInt(file"Deaths"0); 
                
DOF2_SetInt(file"Money"1000); 
                
DOF2_SetInt(file"AdminLevel"0);
                
DOF2_SetInt(file"Score"2);
                
DOF2_SaveFile(); 
                
SetSpawnInfo(playerid001722.5123, -1912.793113.5647269.15000000);
                
SpawnPlayer(playerid);
            }
        }
        case 
DIALOG_LOGIN
        {
            if(!
responseKick(playerid);
            if(
response
            {
                new 
file[64]; 
                
GetPlayerName(playerid,file,sizeof(file));
                
format(file,sizeof(file),DOF2_File(file));
                if(
DOF2_FileExists(file)) 
                {
                    if(
DOF2_CheckLogin(file,inputtext))
                    {
                        
PlayerInfo[playerid][pKills] = DOF2_GetInt(file,"Kills");
                        
PlayerInfo[playerid][pDeaths] = DOF2_GetInt(file,"Deaths");
                        
PlayerInfo[playerid][pMoney] = DOF2_GetInt(file,"Money");
                        
PlayerInfo[playerid][pAdmin] = DOF2_GetInt(file,"AdminLevel");
                        
SetSpawnInfo(playerid001722.5123, -1912.793113.5647269.15000000);
                        
SpawnPlayer(playerid); 
                        
GivePlayerMoney(playeridPlayerInfo[playerid][pMoney]);
                        
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
                        return 
1;
                    }
                    else
                    {
                        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"BLS - Senha Incorreta","Vocк Errou Sua \nSenha Tente Novamente !","Logar","Sair");
                        return 
1;
                    }
                }
            }
        }
    }
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    
PlayerInfo[killerid][pKills]++; 
    
PlayerInfo[playerid][pDeaths]++; 
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
file[64];
    
GetPlayerName(playerid,file,sizeof(file)); 
    
format(file,sizeof(file),DOF2_File(file));
    
DOF2_SetInt(file"Kills",PlayerInfo[playerid][pKills]);
    
DOF2_SetInt(file"Deaths",PlayerInfo[playerid][pDeaths]);
    
DOF2_SetInt(file"Money",PlayerInfo[playerid][pMoney]);
    
DOF2_SetInt(file"Score",PlayerInfo[playerid][pScore]);
    
DOF2_SetInt(file"AdminLevel",PlayerInfo[playerid][pAdmin]);
    
DOF2_SaveFile();
    return 
1;

Reply
#2

Nгo tem como criar a Pasta pelo Pawn, a pasta deve ser criada por vocк.
Reply
#3

Quote:
Originally Posted by jQuery
Посмотреть сообщение
Nгo tem como criar a Pasta pelo Pawn, a pasta deve ser criada por vocк.
sim eu sei '-' mais como eu definir para que as contas registradas vб pra lб
Reply
#4

Exemplo:

PHP код:
DOF2_CreateFile("Pasta/arquivo.ini"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)