Jump to content

Question

Posted

Am urmat acest tutorial(http://www.sa-mp.ro/forum/index.php?topic=5160.0) dar nu reusesc sa fac ultima etapa cu ondialogresponse

Am nevoie de ajutor nu stiu cum sa fac sa mearga.. eu l-am facut asa

[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

    }

if(dialogid == 12346 || dialogid == 12347)

{

if(response)

{

if(strlen(inputtext))

{

new tmppass[64];

strmid(tmppass, inputtext, 0, strlen(inputtext), 255);

OnPlayerLogin(playerid,tmppass);

}

else

{

new loginstring[500];

new loginname[64];

GetPlayerName(playerid,loginname,sizeof(loginname));

format(loginstring,sizeof(loginstring),"{FF0000}WRONG PASSWORD\n\n\n\n\n{FFFF00}NumeSV{FFFFFF} te roaga sa scri parola corecta:",loginname);

ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FF0000}Log-in",loginstring,"Log-in","Exit");

}

}

}

if(dialogid == 12345)

{

if(response)

{

if(strlen(inputtext))

{

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "%s.ini", sendername);

new File: hFile = fopen(string, io_read);

if (hFile)

{

SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");

fclose(hFile);

return 1;

}

new passtring[128];

new tmppass[64];

strmid(tmppass, inputtext, 0, strlen(inputtext), 255);

format(passtring,sizeof(passtring),"{FFFFFF}Your password is( {FF0000}%s {FFFFFF}).Please don't forget your password or you lost the account",tmppass);

                SendClientMessage(playerid, COLOR_ROSUAPRINS, passtring);

OnPlayerRegister(playerid,tmppass);

}

else

{

new regstring[1000];

new regname[64];

GetPlayerName(playerid,regname,sizeof(regname));

format(regstring,sizeof(regstring),"Bun venit, {1E90FF}%s\n{FFFFFF}Nu ai cont.\n\n\n\n\n\n{FFFF00}NumeSV te roaga sa te inregistrezi:",regname);

ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{FF0000}Register",regstring,"Register","Exit");

}

}

}

return 1;[/pawn]

6 answers to this question

Recommended Posts

Posted

Inseamna ca iti lispeste o paranteza. Uite cum era la time public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

    }

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

Inseamna ca iti lispeste o paranteza. Uite cum era la time public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

    }

Am luat-o de la capat , am compilat fara ondialogresponse mia mers (bineinteles cu warning-uri(nu am intrat pe sv)) , dar dupa ce am pus si ondialogresponse imi da "dont send" la pawno .. de la ce poate fi?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.