- 0
[GF/RP] Problema register dialog
-
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
gabbii
am o problema la register dialog, imi apare dialogu cu register scriu orice parola acolo dar nu imi inregistreaza contu... ce pot face?
uitati linile
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new sendername[MAX_PLAYER_NAME]; 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\nPlease enter the correct password",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit"); } } } if(dialogid == 12345) { if(response) { if(strlen(inputtext)) { new string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Users/%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; } else { new regstring[1000]; new regname[64]; GetPlayerName(playerid,regname,sizeof(regname)); format(regstring,sizeof(regstring),"Welcome, %s\nNot registered on this server with this name\nEnter a password to register an account with this name",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit"); } } } } return 0; }0 answers to this question
Recommended Posts