Fikkki 0 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 Zdarec mam registraci vse slape tak jak ma ale kdyz se regnu a znovu prihlasim pusti me to do hry pod jakimkoli hesle a nekdy ho ani nemusim zadat nevite co s tim? Link to comment Share on other sites More sharing options...
0 Vidie 5 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 Zdarec mam registraci vse slape tak jak ma ale kdyz se regnu a znovu prihlasim pusti me to do hry pod jakimkoli hesle a nekdy ho ani nemusim zadat nevite co s tim? o čem mluvíš prosimtě ? Link to comment Share on other sites More sharing options...
0 DooM 93 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 to teda nevime kdyz sem nedas kod Link to comment Share on other sites More sharing options...
0 Fikkki 0 Odesláno: 12. Říjen, 2011 Author Share Odesláno: 12. Říjen, 2011 proste se zaregistruješ na serveru, ukoncis hru, znovu des na server a prihlasis se pod libovolnym heslem a ne pod tim jaky sis zadal pri registraci je to tento tut http://pawno.cz/pouziti-dini-a-dialogu-k-registraci-prihlaseni-v2-t10020.html Link to comment Share on other sites More sharing options...
0 VoDnIk168 0 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 já mám taky dule a de mi normálně Link to comment Share on other sites More sharing options...
0 DooM 93 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 proste se zaregistruješ na serveru, ukoncis hru, znovu des na server a prihlasis se pod libovolnym heslem a ne pod tim jaky sis zadal pri registraci je to tento tut http://pawno.cz/pouziti-dini-a-dialogu-k-registraci-prihlaseni-v2-t10020.html taks to podle toho tutu udelal spatne no :/ dej sem kod sakra a ne tut podle ktereho si to delal Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 Je to tam, jenže musíš dodat s strcmp zjistit heslo jestli obsahuje více než 0 znaků (strlen) Link to comment Share on other sites More sharing options...
0 VoDnIk168 0 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 skus tudle: registrace-pres-dialog-t4802.html Link to comment Share on other sites More sharing options...
0 Fikkki 0 Odesláno: 12. Říjen, 2011 Author Share Odesláno: 12. Říjen, 2011 #include #include #include #include #define B_CERV #FF0000 #define B_ZLUTA #FFFF00 #define B_ZELENA #008000 #define B_MODRA #0000FF #define REGISTER 1 #define LOGIN 2 new bool:IsLogged[MAX_PLAYERS]; new file[MAX_PLAYERS][128]; forward OnPlayerRegister(playerid, heslo[]); forward OnPlayerLogin(playerid, heslo[]); forward OnPlayerSaveAcount(playerid); public OnPlayerConnect(playerid) { if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid)) { format(file[playerid], 128, "%s.ini", PlayerName(playerid)); IsLogged[playerid] = false; if(fexist(file[playerid])) { ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Přihlášení", "Vítáme vás na našem serveru!\nServer:\nHlavní Administrátor:", "Přihlásit", "Odpojit"); } else { ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_INPUT, "Registrace", "Vítáme vás na našem serveru!\nServer:\nHlavní Administrátor:", "Registrovat", "Odpojit"); } } return 1; } public OnPlayerDisconnect(playerid, reason) { if(IsPlayerConnected(playerid)) { OnPlayerSaveAcount(playerid); IsLogged[playerid] = false; } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(IsPlayerConnected(playerid)) { if(dialogid == REGISTER) { if(response == 1) { OnPlayerRegister(playerid, inputtext); } } if(dialogid == LOGIN) { if(response == 1) { new heslo[25]; strmid(heslo, inputtext, 0, strlen(inputtext), 25); OnPlayerLogin(playerid, heslo); } } } return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } public OnPlayerRegister(playerid, heslo[]) { if(IsPlayerConnected(playerid)) { if(strlen(heslo) == 0) return ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_INPUT, "Registrace", "Vítáme vás na našem serveru!\nServer: \nHlavní Administrátor:", "Registrovat", "Odpojit"); dini_Create(file[playerid]); dini_Set(file[playerid], "Heslo:", heslo); IsLogged[playerid] = true; } return 1; } public OnPlayerLogin(playerid, heslo[]) { if(IsPlayerConnected(playerid)) { if(strlen(heslo) == 0) return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Přihlášení", "Vítáme vás na našem serveru!\nServer: Gate\nHlavní Administrátor:", "Přihlásit", "Odpojit"); if(strcmp(dini_Get(file[playerid], "Heslo"), heslo, true) == 0) { IsLogged[playerid] = true; SetPlayerMoney(playerid, dini_Int(file[playerid], "Peníze:")); } else { ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Přihlášení", "Vítáme vás na našem serveru!\nServer:\nHlavní Administrátor:", "Přihlásit", "Odpojit"); } } return 1; } public OnPlayerSaveAcount(playerid) { if(IsPlayerConnected(playerid)) { dini_IntSet(file[playerid], "Peníze", GetPlayerMoney(playerid)); } return 1; } Link to comment Share on other sites More sharing options...
0 Fikkki 0 Odesláno: 12. Říjen, 2011 Author Share Odesláno: 12. Říjen, 2011 Je to tam, jenže musíš dodat s strcmp zjistit heslo jestli obsahuje více než 0 znaků (strlen) to je to same stejna slamastika Link to comment Share on other sites More sharing options...
0 Fikkki 0 Odesláno: 12. Říjen, 2011 Author Share Odesláno: 12. Říjen, 2011 Je to tam, jenže musíš dodat s strcmp zjistit heslo jestli obsahuje více než 0 znaků (strlen) jak by to melo vypadat? Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 if(strcmp(dini_Get(file[playerid], "Heslo"), heslo, true) == 0 && strlen(heslo) > 0) btw new file[MAX_PLAYERS][128]; xDD zabiješ server (500*32*128 = 2,048,000 bit = 256 000 bajt = 25,6 kilo-bajt) Link to comment Share on other sites More sharing options...
0 Fikkki 0 Odesláno: 12. Říjen, 2011 Author Share Odesláno: 12. Říjen, 2011 a když prostě chci aby clovek musel zadavat stejne heslo jako pri registraci? protoze kdyz se zaregistruju tak se muzu prihlasit pod libovolnym hesle a to je na hovn* Link to comment Share on other sites More sharing options...
0 Neczo 0 Odesláno: 12. Říjen, 2011 Share Odesláno: 12. Říjen, 2011 jezis to je jednoduche, precti si treba tuty od ffredyka tak to mas popsane je to jen podminka xD Link to comment Share on other sites More sharing options...
Dotaz
Fikkki 0
Zdarec mam registraci vse slape tak jak ma ale kdyz se regnu a znovu prihlasim pusti me to do hry pod jakimkoli hesle a nekdy ho ani nemusim zadat nevite co s tim?
Link to comment
Share on other sites
13 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now