kamilko39 9 Odesláno: 26. Duben, 2016 Share Odesláno: 26. Duben, 2016 Ahojte mám problém Ked sa hráč zamestná tak pri spawne sa mu neuloží kde sa zamestnal Taktiež pri connecte je 2 000 000 bude mat napr 490 700 a znova ked zapne hru tak má 2 000 000 PS: Pawno sa učím, každa vaša rada my hádam pomôže tím že sa učíme, môžeme dosiahnut čo chceme Link to comment Share on other sites More sharing options...
0 ATomas 286 Odesláno: 26. Duben, 2016 Share Odesláno: 26. Duben, 2016 Zacal bych prvni radou: ukaz kod Link to comment Share on other sites More sharing options...
0 kamilko39 9 Odesláno: 26. Duben, 2016 Author Share Odesláno: 26. Duben, 2016 Kod public connect ? Alebo celí mod ? Nechcel by som ho tu moc zverejnovat Link to comment Share on other sites More sharing options...
0 Lukasz 336 Odesláno: 26. Duben, 2016 Share Odesláno: 26. Duben, 2016 Kód ukládání a načítání údajů Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 26. Duben, 2016 Share Odesláno: 26. Duben, 2016 Kod public connect ? Alebo celí mod ? Nechcel by som ho tu moc zverejnovat Len tak pomimo, niet tam moc vela toho čo by sme mohli odtial "ukradnúť"... Ano, public OnPlayerConnect a OnPlayerDisconnect (prípadne ak sa načítavanie údajov vykonáva v OnDialogResponse tak aj ten) Link to comment Share on other sites More sharing options...
0 LukYs 1 Odesláno: 27. Duben, 2016 Share Odesláno: 27. Duben, 2016 Uz jsem si myslel, ze misto " nechce mi uložit povolanie napsal nechce se mi uložit povolanie Link to comment Share on other sites More sharing options...
0 DNLS 31 Odesláno: 27. Duben, 2016 Share Odesláno: 27. Duben, 2016 Uz jsem si myslel, ze misto " nechce mi uložit povolanie napsal nechce se mi uložit povolanie Taky je otázka, jestli ho vůbec ukládáš. Link to comment Share on other sites More sharing options...
0 kamilko39 9 Odesláno: 28. Duben, 2016 Author Share Odesláno: 28. Duben, 2016 Takže public OnPlayerConnect(playerid){ gPlayerLogged[playerid] = 0; new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if (!dini_Exists(file)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Registrácia", "Zadajte Svoje Heslo", "Register", "Exit"); } if(fexist(file)) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Zadajte svoje Heslo", "Login", "Exit"); } return 1;}public OnPlayerDisconnect(playerid, reason){ new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); switch(reason) { case 0: format(string, 350, "{FFFFFF} Hráč {FF0000}%s {FFFFFF}opustil Knight-Parbu {FF0000}[Odpojil se]", pname); case 1: format(string, 350, "{FFFFFF} Hráč {FF0000}%s {FFFFFF}opustil Knight-Parbu {FF0000}[Pád Hry]", pname); case 2: format(string, 350, "{FFFFFF} Hráč {FF0000}%s {FFFFFF}opustil Knight-Parbu {FF0000}[Kick/Ban]", pname); } SendClientMessageToAll(0xAAAAAAAA, string); new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(gPlayerLogged[playerid] == 1) { dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills]); dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]); dini_IntSet(file, "Money", PlayerInfo[playerid][pCash]); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]); dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths]); dini_IntSet(file, "Seconds",PlayerInfo[playerid][pDays]); dini_IntSet(file, "Minutes",PlayerInfo[playerid][pMinuts]); dini_IntSet(file, "Hours",PlayerInfo[playerid][pHours]); } gPlayerLogged[playerid] = 0; return 1;} public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if (dialogid == 1) { new name[MAX_PLAYER_NAME], file[256], string[300]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Registrácia", "Napíšte Svoje Heslo", "Register", "Exit"); dini_Create(file); dini_IntSet(file, "Password", udb_hash(inputtext)); //dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills] = 0); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 2000000); dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths] = 0); dini_IntSet(file, "Seconds",PlayerInfo[playerid][pDays] = 0); dini_IntSet(file, "Minutes",PlayerInfo[playerid][pMinuts] = 0); dini_IntSet(file, "Hours",PlayerInfo[playerid][pHours] = 0); dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 2000000); format(string, 300, "{FFFFFF}[ {FF0000}SYSTEM {FFFFFF}] {FF0000}:Uspešne zaregistrovaný tvoje meno je {FFFFFF}%s {FF0000}a heslo je {FFFFFF}%s.", name, inputtext); SendClientMessage(playerid, COLOR_YELLOW, string); gPlayerLogged[playerid] = 1; } if (dialogid == 2) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Si zaregistrovaný", "Vyborne zaregistrovaný .. pametaj si heslo", "Login", "Leave"); new tmp; tmp = dini_Int(file, "Password"); if(udb_hash(inputtext) != tmp) { SendClientMessage(playerid, COLOR_RED, "{FFFFFF}[ {FF0000} Systém {FFFFFF}] {FF0000}Zadaly Ste si zle Heslo "); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "zadajte Znova Heslo", "Login", "Exit"); } else { gPlayerLogged[playerid] = 1; PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); PlayerInfo[playerid][pKills] = dini_Int(file, "Kills"); PlayerInfo[playerid][pDeaths] = dini_Int(file, "Deaths"); PlayerInfo[playerid][pDays] = dini_Int(file, "Days"); PlayerInfo[playerid][pMinuts] = dini_Int(file, "Minuts"); PlayerInfo[playerid][pHours] = dini_Int(file, "Hours"); GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid)); SendClientMessage(playerid,COLOR_RED, "{FFFFFF}[ {FF0000}SYSTEM {FFFFFF}]{FF0000}:Login prijatý!"); //**************************************možno***************************************** format(string,sizeof(string), "Meno hráča: %s\n", PlayerName(playerid)); format(string,sizeof(string), "%s Money: %d\n", string,GetPlayerMoney(playerid)); format(string,sizeof(string), "%s Score: %d\n", string,PlayerInfo[playerid][pScore]); format(string,sizeof(string), "%s Hodin: %d\n", string,PlayerInfo[playerid][pHours]); format(string,sizeof(string), "%s minut: %d\n", string,PlayerInfo[playerid][pMinuts]); format(string,sizeof(string), "%s Dní: %d\n", string,PlayerInfo[playerid][pDays]); format(string,sizeof(string), "%s Deaths: %d\n",string,PlayerInfo[playerid][pDeaths]); format(string,sizeof(string), "%s Kills: %d\n", string,PlayerInfo[playerid][pKills]); ShowPlayerDialog(p,8878547,DIALOG_STYLE_MSGBOX,"Info hráča",string,"Ok","koniec"); } } return 1;} Ukladanie na povolanie NEMAM Lebo Neviem ako ho urobiť hádam pomôžete Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 28. Duben, 2016 Share Odesláno: 28. Duben, 2016 aha už mě to došlo... takže si to jen zkopíroval.. budiž.. žer dini_IntSet(file, "Job",PlayerInfo[playerid][pJob]); Link to comment Share on other sites More sharing options...
0 kamilko39 9 Odesláno: 28. Duben, 2016 Author Share Odesláno: 28. Duben, 2016 nn neskopiroval pridal som tam dačo aj dačo som skopiroval jj Dakujem pridam to tam Link to comment Share on other sites More sharing options...
0 Deleted User 295 Odesláno: 7. Květen, 2016 Share Odesláno: 7. Květen, 2016 nn neskopiroval dačo som skopiroval Link to comment Share on other sites More sharing options...
0 kamilko39 9 Odesláno: 7. Květen, 2016 Author Share Odesláno: 7. Květen, 2016 jj ale iba niečo ale mám teraz taký prolem že ked sa hráč spawne tak mu to neuloži score čo nahral je to vyšie potom ešte taký jeden že si môže pridať money cez S0beit prosim pomôžete mi ? Link to comment Share on other sites More sharing options...
Dotaz
kamilko39 9
Ahojte mám problém
Ked sa hráč zamestná tak pri spawne sa mu neuloží kde sa zamestnal
Taktiež pri connecte je 2 000 000 bude mat napr 490 700 a znova ked zapne hru tak má 2 000 000
PS: Pawno sa učím, každa vaša rada my hádam pomôže tím že sa učíme, môžeme dosiahnut čo chceme
Link to comment
Share on other sites
11 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