Vyholený*_*Sandokán 1 Odesláno: 7. Duben, 2013 Share Odesláno: 7. Duben, 2013 zdravím,mám menší problem. Ak si nastavim VIP na 1,odpojim sa zo servera a znova napojim tak ho nemam,znová ho musim nastavovať.. ak by niekto vedel čo z tým,dajte mi vedieť :/ načitanie: case DIALOG_LOGIN: { if(!response) Kick(playerid); if(response) { new file[64]; GetPlayerName(playerid,file,sizeof(file)); format(file,sizeof(file),"/Account/%s.ini",(file)); if(dini_Exists(file)) { if(strcmp(dini_Get(file, "Heslo"),inputtext,true)) { PlayerInfo[playerid][Kill] = dini_Int(file,"Kill"); PlayerInfo[playerid][Vip] = dini_Int(file,"Vip"); PlayerInfo[playerid][Admin] = dini_Int(file,"Admin"); PlayerInfo[playerid][Death] = dini_Int(file,"Death"); PlayerInfo[playerid][Money] = dini_Int(file,"Money"); GivePlayerMoney(playerid, PlayerInfo[playerid][Money]); Login[playerid] = 1; return 0; } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FF0000}*{FFFFFF}Prihlasenie{FF0000}*","{FF0000}Napisal si nesprávne heslo!\n{FFFFFF}Ak sa chceš prihlásiť,napíš svoje heslo!","Login","Odpojit"); return 0; } } } } Link to comment Share on other sites More sharing options...
0 Petr 44 Odesláno: 7. Duben, 2013 Share Odesláno: 7. Duben, 2013 if(strcmp(dini_Get(file, "Heslo"),inputtext,true)) WIKI: strcmp Returns -1 if string1 comes before string2 1 if string1 comes after string2 0 if the strings are the same (for the matched length) Tudíž to má vypadat takto: if(strcmp(dini_Get(file, "Heslo"),inputtext,true) == 0) Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 7. Duben, 2013 Author Share Odesláno: 7. Duben, 2013 skusim //EDIT: ajtak,stale nechce nahrať vip ani admin level Link to comment Share on other sites More sharing options...
0 Petr 44 Odesláno: 7. Duben, 2013 Share Odesláno: 7. Duben, 2013 http://pawno.cz/topic/37497-kontrolujeme-spravny-chod-podminek/ Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 7. Duben, 2013 Author Share Odesláno: 7. Duben, 2013 každy mi tu dávate linky,ale aby ste mi povedali čo je tam zle tak to nie.. ! Link to comment Share on other sites More sharing options...
0 Adrián Lipták 51 Odesláno: 7. Duben, 2013 Share Odesláno: 7. Duben, 2013 V stringu file. "/Account", nie "Account", bez toho lomítka nazačiatku. Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 7. Duben, 2013 Author Share Odesláno: 7. Duben, 2013 stále nič,stále keď vypnem a znova zapnem server,znova musim dávať level Link to comment Share on other sites More sharing options...
0 Adrián Lipták 51 Odesláno: 7. Duben, 2013 Share Odesláno: 7. Duben, 2013 Ukáž onPlayerDisconnect, alebo ukladanie. Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 7. Duben, 2013 Author Share Odesláno: 7. Duben, 2013 public OnPlayerDisconnect(playerid, reason) { Login[playerid] = 1; new file[128]; format(file, sizeof(file), "Account/%s.ini", Meno(playerid)); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, "Kill", PlayerInfo[playerid][Kill]); dini_IntSet(file, "Death", PlayerInfo[playerid][Death]); dini_IntSet(file, "Money", PlayerInfo[playerid][Money]); dini_IntSet(file, "Admin", PlayerInfo[playerid][Admin]); dini_IntSet(file, "VIP", PlayerInfo[playerid][Vip]); } Login[playerid] = 0; return 1; } čo tu mám zle? Link to comment Share on other sites More sharing options...
0 Lerry 15 Odesláno: 7. Duben, 2013 Share Odesláno: 7. Duben, 2013 Login[playerid] = 0; SMAZAT ! Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 7. Duben, 2013 Author Share Odesláno: 7. Duben, 2013 nepomohlo.. Link to comment Share on other sites More sharing options...
0 Codeer 1 Odesláno: 8. Duben, 2013 Share Odesláno: 8. Duben, 2013 Už dlouho (asi 2 roky) jsem v pawnu nedelal takze nevim jak moc na tom zalezi, ale vsimni si ze kdyz ukladas tak tam mas "Vip" PlayerInfo[playerid][Vip] = dini_Int(file,"Vip"); a kdyz nacitas tak "VIP" dini_IntSet(file, "VIP", PlayerInfo[playerid][Vip]); takze bych rekl ze je problem ve velikosti pismen a diky tomu se nacita neulozena informace jestli me chapes Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 8. Duben, 2013 Author Share Odesláno: 8. Duben, 2013 ee,nepomohlo.. to iste my robí aj z admin lvl Link to comment Share on other sites More sharing options...
0 Codeer 1 Odesláno: 8. Duben, 2013 Share Odesláno: 8. Duben, 2013 Takze jsi zmenil v ukladani i nacitani to "Vip" na stejne velka pismena aby v obou bylo napsano "Vip"? a ne v jednom "Vip" a v druhem "VIP" protoze v tom by mel byt problem. Tet jsem se dival na sa-mp forum kde mel jeden chlap taky problem s ukladanim a taky tam mel ruznou velikost pismen... Link to comment Share on other sites More sharing options...
0 Petr 44 Odesláno: 8. Duben, 2013 Share Odesláno: 8. Duben, 2013 http://pawno.cz/topi...-chod-podminek/ Co kdyby jsi to zkusil? Link to comment Share on other sites More sharing options...
0 Adrián Lipták 51 Odesláno: 8. Duben, 2013 Share Odesláno: 8. Duben, 2013 Login[playerid] = 0; SMAZAT ! BLbosť. Zmazať Login[playerid] = 1; // toto zmazať tamto nechať. ee,nepomohlo.. to iste my robí aj z admin lvl Presne ako to ukladáš tak to aj načítavaj ok ? Daj zaradom, Kill, deaths, money, admin, vip.. chápeš? Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 8. Duben, 2013 Author Share Odesláno: 8. Duben, 2013 už netreba,vyriešil som.. môžte lock Link to comment Share on other sites More sharing options...
0 Adrián Lipták 51 Odesláno: 8. Duben, 2013 Share Odesláno: 8. Duben, 2013 Napíš ako, ľudia sa poučia. Link to comment Share on other sites More sharing options...
0 Vyholený*_*Sandokán 1 Odesláno: 8. Duben, 2013 Author Share Odesláno: 8. Duben, 2013 nepoužil som PlayerInfo[playerid][Admin] = dini_Int(file,"Admin"); ale inú premenu ADMIN[playerid] = dini_Int(file,"Admin"); a tak to už ide Link to comment Share on other sites More sharing options...
Dotaz
Vyholený*_*Sandokán 1
zdravím,mám menší problem. Ak si nastavim VIP na 1,odpojim sa zo servera a znova napojim tak ho nemam,znová ho musim nastavovať.. ak by niekto vedel čo z tým,dajte mi vedieť :/
načitanie:
Link to comment
Share on other sites
18 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