dandiss 0 Odesláno: 14. Červen, 2013 Share Odesláno: 14. Červen, 2013 Dobrý den proč mi to neuklada ani ridicak nic prosím poradte public OnPlayerDisconnect(playerid, reason) { new cesta[50]; if (PLAYERLIST_authed[playerid]) { dini_IntSet(cesta,"Skin",GetPlayerSkin(playerid)); dini_IntSet(cesta,"Ridicak",Ridicak[playerid]); dini_IntSet(cesta,"Letecak",Letecak[playerid]); dini_IntSet(cesta,"Money",GetPlayerMoney(playerid)); } PLAYERLIST_authed[playerid] = false; return 1; } Prosím dyštak skype: bagy1231 děkuju za radu Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 14. Červen, 2013 Share Odesláno: 14. Červen, 2013 public OnPlayerDisconnect(playerid, reason) { new cesta[MAX_PLAYER_NAME+5]; GetPlayerName(playerid,cesta,sizeof(cesta)); strcat(cesta,".sav"); if (PLAYERLIST_authed[playerid]) { dini_IntSet(cesta,"Skin",GetPlayerSkin(playerid)); dini_IntSet(cesta,"Ridicak",Ridicak[playerid]); dini_IntSet(cesta,"Letecak",Letecak[playerid]); dini_IntSet(cesta,"Money",GetPlayerMoney(playerid)); } PLAYERLIST_authed[playerid] = false; return 1; } Daj sem ešte načítavanie údajov... Typujem že aj tam máš chybu.... Link to comment Share on other sites More sharing options...
0 dandiss 0 Odesláno: 14. Červen, 2013 Author Share Odesláno: 14. Červen, 2013 neviem prečo ale stále to nejde Se nechce prostě ukládat dám si peníze ve hře vypnu se a stejně mi to nedá do %s.ini nevím čím to je prosím help public OnPlayerConnect(playerid) { logged[playerid] = 0; new file[50]; format(file,sizeof(file),"/%s.ini",PlayerName(playerid)); //%s - je Hráčové meno ktoré je za čiarkou. pravdaže tam môže byť aj nejaká premenná if(!dini_Exists(file)){ //Ak neexistuje súbor dini_Create(file); // Vytvorí ho ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Registrácia","Zadajte svoje heslo:","Registrovať","Zrušiť"); /// Zobrazenie dialógu s registráciou }else{ ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prihlásenie","Zadajte svoje heslo:","Prihlásiť","Zrušiť"); // Zobrazenie dialógu s prihlásením } return 1; } registrace: new cesta[100]; // zadefinujeme novu cestu ukladania format(cesta, sizeof(cesta), "/%s.ini", PlayerName(playerid)); // Zas to čo aj v OnPlayerConnect ShowPlayerDialog(playerid,99,DIALOG_STYLE_MSGBOX,"{CC0000}Registrace","{00FF33}Úspěšně ses zaregistroval !","OK",""); // Naskočí dialog že sa úspešne registroval dini_Set(cesta,"Nick",PlayerName(playerid)); // Uloží meno dini_Set(cesta,"Heslo",inputtext); dini_IntSet(cesta,"Skin",GetPlayerSkin(playerid)); // skin dini_IntSet(cesta,"Ridicak",Ridicak[playerid]); dini_IntSet(cesta,"Letecak",Letecak[playerid]); dini_IntSet(cesta,"Money",GetPlayerMoney(playerid)); // prachy logged[playerid] = 1; // Nastaví ho za prihláseného Login: format(cesta, sizeof(cesta), "/%s.ini", PlayerName(playerid)); if(!strcmp(dini_Get(cesta, "heslo"), inputtext)){ // Získa heslo a skontroluje ho s textom if(strlen(inputtext)>1) // Ak je tam viac ako 1znak (pre istotu) { // ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX,"{CC0000}Přihlášení","{00FF33}Přihlášení proběhlo úspěšne!","OK",""); SetPlayerMoney(playerid, dini_Int(cesta, "Money")); SetPlayerSkin(playerid, dini_Int(cesta, "Skin")); Ridicak[playerid] = dini_Int(cesta,"Ridicak"); Letecak[playerid] = dini_Int(cesta,"Letecak"); logged[playerid] = 1; // Prihlási ho Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 14. Červen, 2013 Share Odesláno: 14. Červen, 2013 public OnPlayerConnect(playerid) { logged[playerid] = 0; new file[50]; format(file,sizeof(file),"%s.ini",PlayerName(playerid)); //%s - je Hráčové meno ktoré je za čiarkou. pravdaže tam môže byť aj nejaká premenná if(!dini_Exists(file)){ //Ak neexistuje súbor dini_Create(file); // Vytvorí ho ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Registrácia","Zadajte svoje heslo:","Registrovať","Zrušiť"); /// Zobrazenie dialógu s registráciou }else{ ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prihlásenie","Zadajte svoje heslo:","Prihlásiť","Zrušiť"); // Zobrazenie dialógu s prihlásením } return 1; } registrace: new cesta[30]; // zadefinujeme novu cestu ukladania format(cesta, sizeof(cesta), "%s.ini", PlayerName(playerid)); // Zas to čo aj v OnPlayerConnect ShowPlayerDialog(playerid,99,DIALOG_STYLE_MSGBOX,"{CC0000}Registrace","{00FF33}Úspěšně ses zaregistroval !","OK",""); // Naskočí dialog že sa úspešne registroval dini_Set(cesta,"Nick",PlayerName(playerid)); // Uloží meno dini_Set(cesta,"Heslo",inputtext); dini_IntSet(cesta,"Skin",GetPlayerSkin(playerid)); // skin dini_IntSet(cesta,"Ridicak",Ridicak[playerid]); dini_IntSet(cesta,"Letecak",Letecak[playerid]); dini_IntSet(cesta,"Money",GetPlayerMoney(playerid)); // prachy logged[playerid] = 1; // Nastaví ho za prihláseného Login: format(cesta, sizeof(cesta), "%s.ini", PlayerName(playerid)); if(!strcmp(dini_Get(cesta, "heslo"), inputtext)){ // Získa heslo a skontroluje ho s textom if(strlen(inputtext)>1) // Ak je tam viac ako 1znak (pre istotu) { // ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX,"{CC0000}Přihlášení","{00FF33}Přihlášení proběhlo úspěšne!","OK",""); SetPlayerMoney(playerid, dini_Int(cesta, "Money")); SetPlayerSkin(playerid, dini_Int(cesta, "Skin")); Ridicak[playerid] = dini_Int(cesta,"Ridicak"); Letecak[playerid] = dini_Int(cesta,"Letecak"); logged[playerid] = 1; // Prihlási ho public OnPlayerDisconnect(playerid, reason) { new cesta[30]; format(cesta, sizeof(cesta), "%s.ini", PlayerName(playerid)); if (PLAYERLIST_authed[playerid]) { dini_IntSet(cesta,"Skin",GetPlayerSkin(playerid)); dini_IntSet(cesta,"Ridicak",Ridicak[playerid]); dini_IntSet(cesta,"Letecak",Letecak[playerid]); dini_IntSet(cesta,"Money",GetPlayerMoney(playerid)); } PLAYERLIST_authed[playerid] = false; return 1; } Link to comment Share on other sites More sharing options...
0 dandiss 0 Odesláno: 14. Červen, 2013 Author Share Odesláno: 14. Červen, 2013 Nejde ti dám team viewer napiš do zpráv Pomožte někdo nejde mi to Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 14. Červen, 2013 Share Odesláno: 14. Červen, 2013 public OnPlayerDisconnect(playerid, reason) { new cesta[30]; format(cesta, sizeof(cesta), "%s.ini", PlayerName(playerid)); if (logged[playerid]) { dini_IntSet(cesta,"Skin",GetPlayerSkin(playerid)); dini_IntSet(cesta,"Ridicak",Ridicak[playerid]); dini_IntSet(cesta,"Letecak",Letecak[playerid]); dini_IntSet(cesta,"Money",GetPlayerMoney(playerid)); } logged[playerid] = false; return 1; } Link to comment Share on other sites More sharing options...
0 dandiss 0 Odesláno: 14. Červen, 2013 Author Share Odesláno: 14. Červen, 2013 VYŘEŠENO loCK PROSÍM Link to comment Share on other sites More sharing options...
Dotaz
dandiss 0
Dobrý den proč mi to neuklada ani ridicak nic prosím poradte
Prosím dyštak skype: bagy1231 děkuju za radu
Link to comment
Share on other sites
6 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