- 0
problema on
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
Taykiro
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