DaNeX 5 Odesláno: 30. Duben, 2015 Share Odesláno: 30. Duben, 2015 (upraveno) Nevíte proč se vždy při registraci nového hráče načtou informace posledního hráče co dal /q ? connect new Gracz [64]; new Gname [MAX_PLAYER_NAME]; GetPlayerName(playerid,Gname,sizeof(Gname)); format(Gracz,sizeof(Gracz), "/ExpAcc/%s.cfg",Gname); if(DOF2_FileExists(Gracz)) { SendClientMessage(playerid, -1, "Tvůj účet /estats /stats /levely se úspěšně načetl!"); pEInfo[playerid][uroven] = DOF2_GetInt(Gracz, "Level"); pEInfo[playerid][Exp] = DOF2_GetInt(Gracz, "Exp"); pEInfo[playerid][Respect] = DOF2_GetInt(Gracz, "Respect"); pEInfo[playerid][Kills] = DOF2_GetInt(Gracz, "Kills"); pEInfo[playerid][Deaths] = DOF2_GetInt(Gracz, "Deaths"); pEInfo[playerid][mExp] = DOF2_GetInt(Gracz, "mExp"); pEInfo[playerid][mMoney] = DOF2_GetInt(Gracz, "mMoney"); pEInfo[playerid][Combo] = DOF2_GetInt(Gracz, "Combo"); SendClientMessage(playerid, -1, "{00CC00}Tohle je Admin Server.{00FF00} ( Pracuje na bázi Expení. Každý další level se ti odemkne nový příkaz /levely )"); } else { SendClientMessage(playerid, -1, "Tvůj účet /estats /stats /levely zde není. Nyní byl zaregistrován!"); DOF2_CreateFile(Gracz); DOF2_SetInt(Gracz,"Level",0); DOF2_SetInt(Gracz,"Exp",0); DOF2_SetInt(Gracz,"Respect",0); DOF2_SetInt(Gracz,"Kills",0); DOF2_SetInt(Gracz,"Deaths",0); DOF2_SetInt(Gracz,"mExp",0); DOF2_SetInt(Gracz,"mMoney",0); DOF2_SetInt(Gracz,"Combo",0); DOF2_SaveFile(); } Disconnect public OnPlayerDisconnect(playerid, reason) { new Gracz [64]; new Gname[MAX_PLAYER_NAME]; GetPlayerName(playerid,Gname,sizeof(Gname)); format(Gracz,sizeof(Gracz),"/ExpAcc/%s.cfg",Gname); if(DOF2_FileExists(Gracz)) { DOF2_SetInt(Gracz,"Level",pEInfo[playerid][uroven]); DOF2_SetInt(Gracz,"Exp",pEInfo[playerid][Exp]); DOF2_SetInt(Gracz,"Respect",pEInfo[playerid][Respect]); DOF2_SetInt(Gracz,"Kills",pEInfo[playerid][Deaths]); DOF2_SetInt(Gracz,"mExp",pEInfo[playerid][mExp]); DOF2_SetInt(Gracz,"mMoney",pEInfo[playerid][mMoney]); DOF2_SetInt(Gracz,"Combo",pEInfo[playerid][mExp]); DOF2_SaveFile(); } Edited 30. Duben, 2015 by DaNeX Link to comment Share on other sites More sharing options...
eXot 18 Odesláno: 30. Duben, 2015 Share Odesláno: 30. Duben, 2015 Tiež som mal takýto istý problém s DOF2, aj napriek tomu že som pri disconnecte všetkým premenným nastavil hodnotu na 0. Vyriešil som to prechodom na klasiku, fread/fwrite. Link to comment Share on other sites More sharing options...
DaNeX 5 Odesláno: 1. Květen, 2015 Author Share Odesláno: 1. Květen, 2015 ? Link to comment Share on other sites More sharing options...
DaNeX 5 Odesláno: 1. Květen, 2015 Author Share Odesláno: 1. Květen, 2015 To je asi co ? lol.. SendClientMessage(playerid, -1, "Tvůj účet /estats /stats /levely zde není. Nyní byl zaregistrován!"); DOF2_CreateFile(Gracz); DOF2_SetInt(Gracz,"Level",0); DOF2_SetInt(Gracz,"Exp",0); DOF2_SetInt(Gracz,"Respect",0); DOF2_SetInt(Gracz,"Kills",0); DOF2_SetInt(Gracz,"Deaths",0); DOF2_SetInt(Gracz,"mExp",0); DOF2_SetInt(Gracz,"mMoney",0); DOF2_SetInt(Gracz,"Combo",0); DOF2_SaveFile(); } Link to comment Share on other sites More sharing options...
DaNeX 5 Odesláno: 2. Květen, 2015 Author Share Odesláno: 2. Květen, 2015 (upraveno) Trotl.. connect new Gracz [64]; new Gname [MAX_PLAYER_NAME]; GetPlayerName(playerid,Gname,sizeof(Gname)); format(Gracz,sizeof(Gracz), "/ExpAcc/%s.cfg",Gname); if(DOF2_FileExists(Gracz)) { SendClientMessage(playerid, -1, "Tvůj účet /estats /stats /levely se úspěšně načetl!"); pEInfo[playerid][uroven] = DOF2_GetInt(Gracz, "Uroven"); pEInfo[playerid][Exp] = DOF2_GetInt(Gracz, "Exp"); pEInfo[playerid][Respect] = DOF2_GetInt(Gracz, "Respect"); pEInfo[playerid][Kills] = DOF2_GetInt(Gracz, "Kills"); pEInfo[playerid][Deaths] = DOF2_GetInt(Gracz, "Deaths"); pEInfo[playerid][mExp] = DOF2_GetInt(Gracz, "mExp"); pEInfo[playerid][mMoney] = DOF2_GetInt(Gracz, "mMoney"); pEInfo[playerid][Combo] = DOF2_GetInt(Gracz, "Combo"); SendClientMessage(playerid, -1, "{00CC00}Tohle je Admin Server.{00FF00} ( Pracuje na bázi Expení. Každý další level se ti odemkne nový příkaz /levely )"); } else { SendClientMessage(playerid, -1, "Tvůj účet /estats /stats /levely zde není. Nyní byl zaregistrován!"); DOF2_CreateFile(Gracz); DOF2_SetInt(Gracz,"Uroven",0); DOF2_SetInt(Gracz,"Exp",0); DOF2_SetInt(Gracz,"Respect",0); DOF2_SetInt(Gracz,"Kills",0); DOF2_SetInt(Gracz,"Deaths",0); DOF2_SetInt(Gracz,"mExp",0); DOF2_SetInt(Gracz,"mMoney",0); DOF2_SetInt(Gracz,"Combo",0); DOF2_SaveFile(); pEInfo[playerid][uroven] = 0; pEInfo[playerid][Exp] = 0; pEInfo[playerid][Respect] = 0; pEInfo[playerid][Kills] = 0; pEInfo[playerid][Deaths] = 0; pEInfo[playerid][mExp] = 0; pEInfo[playerid][mMoney] = 0; pEInfo[playerid][Combo] = 0; } Dává furt 0 i když již je registrováno disconnect new Gracz [64]; new Gname[MAX_PLAYER_NAME]; GetPlayerName(playerid,Gname,sizeof(Gname)); format(Gracz,sizeof(Gracz),"/ExpAcc/%s.cfg",Gname); if(DOF2_FileExists(Gracz)) { DOF2_SetInt(Gracz,"Level",pEInfo[playerid][uroven]); DOF2_SetInt(Gracz,"Exp",pEInfo[playerid][Exp]); DOF2_SetInt(Gracz,"Respect",pEInfo[playerid][Respect]); DOF2_SetInt(Gracz,"Kills",pEInfo[playerid][Deaths]); DOF2_SetInt(Gracz,"mExp",pEInfo[playerid][mExp]); DOF2_SetInt(Gracz,"mMoney",pEInfo[playerid][mMoney]); DOF2_SetInt(Gracz,"Combo",pEInfo[playerid][mExp]); DOF2_SaveFile(); } ? Edited 1. Květen, 2015 by DaNeX Link to comment Share on other sites More sharing options...
Noob14_ 7 Odesláno: 2. Květen, 2015 Share Odesláno: 2. Květen, 2015 Nevím, proč radší nepoužiješ dini nebo Y_les nebo jak to je :D Link to comment Share on other sites More sharing options...
The hidden face 77 Odesláno: 2. Květen, 2015 Share Odesláno: 2. Květen, 2015 dini je sice mnohel lehčí než DOF2 a y_ini, ale je taky o dost (a to opravdu o hodně) pomalejší. Takže je rozhodně lepší se naučit tyhle novější. Beztak za to nemůže dof2, chybu bude mít někde on, protože s tím zřejmě neumí. Link to comment Share on other sites More sharing options...
Amenadiel 286 Odesláno: 2. Květen, 2015 Share Odesláno: 2. Květen, 2015 dini je sice mnohel lehčí než DOF2 a y_ini, ale je taky o dost (a to opravdu o hodně) pomalejší. Takže je rozhodně lepší se naučit tyhle novější. Beztak za to nemůže dof2, chybu bude mít někde on, protože s tím zřejmě neumí. ano DOF2 je težká protože tam má v názvu 2 že? DOF2_SetInt(Soubor,key,int); dini_SetInt(Soubor,key,int); fakt je to moc složité je tam ta dvojka no... 1 Link to comment Share on other sites More sharing options...
DaNeX 5 Odesláno: 2. Květen, 2015 Author Share Odesláno: 2. Květen, 2015 Mám to furt stejně ( jak v poslením mém komentáři) Při novém účtě mám vše na nule. Dám si Level na 33 , odpojím se ze hry .. připojím se a stejně se to zase dá všechno na nulu .. Link to comment Share on other sites More sharing options...
DaNeX 5 Odesláno: 3. Květen, 2015 Author Share Odesláno: 3. Květen, 2015 Ah , díky .. už fakčí Link to comment Share on other sites More sharing options...
Recommended Posts