[help]registration system
#1

how to make the registry system goes into the account folder.
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == logindraw[playerid])
    {

            new plname[MAX_PLAYER_NAME];
			GetPlayerName(playerid,loginname,sizeof(loginname));
            GetPlayerName(playerid, plname, sizeof(plname));
            format(gstring,sizeof(gstring), "Pasta_Players Players/%s.ini", plname);

            if(DOF2_FileExists(gstring)) {
                // SEU SISTEMA DE LOGIN
            }
            else {
                ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк nгo tem uma conta!", "Ok", "");
        }
    }
    if(playertextid == Textdraw8[playerid])
    {

        SendClientMessage(playerid, COLOR_LIGHTRED,"Voce Saiu Do Servidor Por Vontande Propria.");
        Kick(playerid);
        return 1;
    }
    if(playertextid == CreditosText[playerid])
    {
        new DialoTOWNSE;
        if(IsPlayerConnected(playerid))
        {
            ShowPlayerDialog(playerid, DialoTOWNSE, DIALOG_STYLE_MSGBOX, "{FE642E}Creditos", "{ffffff}Dono:\n{FA58F4}Leo_Killing\n\n{ffffff}Script/Maper:\n{FA58F4}Cr_Killing\n\n{ffffff}Forum:\n{FA58F4}Joao_Player\n\n\n•FIM•", "Entedi", "");
        }
    }
    if(playertextid == Registredraw[playerid]) //karaio
    {
        new loginstring[300];
        GetPlayerName(playerid,loginname,sizeof(loginname));
        format(loginstring,sizeof(loginstring),"{33FF00}{FFFFFF}Bem Vindo(a): {FF0000}%s\n\n{FFFFFF}Conta nгo registrada\n\nDigite sua Senha para se Registrar!\n\n ",loginname);
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD,"B40404}Registrando",loginstring,"Registrar","Sair");
        format(string, sizeof(string), "Bem vindo(a) ao %s", SCRIPT_VERSION);
        SendClientMessage(playerid, COR_VAGOS, string);
        //SendClientMessage(playerid, 0xFFA500FF, "Vocк nгo estб registrado, para poder jogar vocк precisa");
        //SendClientMessage(playerid, COR_AL, "registrar estб conta primeiro.");
    }
    return 1;
}
BRAZILIAN
Reply
#2

"Pasta_Players Players/%s.ini"

Tem certeza que esse diretуrio estб certo?

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid) {
        case 
2:
        {
            if(
response) { // response == 1 
                
DOF2_CreateFile(gstring);
            }
            else {
// 2nd but/esc | response == 0
                
Kick(playerid);            
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)