Agent_007 0 Odesláno: 1. Září, 2014 Share Odesláno: 1. Září, 2014 #include <a_samp> #include <dini> #include <dudb> #pragma unused ret_memcpy #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define SERVER_USER_FILE "Account/%s.ini" enum pInfo { pAdminLevel, pCash, pScore, } new PlayerInfo[MAX_PLAYERS][pInfo]; new gPlayerLogged[MAX_PLAYERS]; public OnPlayerConnect(playerid) { gPlayerLogged[playerid] = 0; new name[MAX_PLAYER_NAME], 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, "Text", "Bla bla bla", "Register", "Exit"); } if(fexist(file)) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Text", "bla bla bla", "Login", "Exit"); } return 1; } public OnPlayerDisconnect(playerid, reason) { 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, "Score", PlayerInfo[playerid][pScore]); dini_IntSet(file, "Money", PlayerInfo[playerid][pCash]); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]); } gPlayerLogged[playerid] = 0; return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == 1) { new name[MAX_PLAYER_NAME], file[256], string[128]; 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, "Text", "bla bla ", "Register", "Exit"); dini_Create(file); dini_IntSet(file, "Password", udb_hash(inputtext)); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500); dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0); format(string, 128, "[SYSTEM]:Uspešne zaregistrovaný tvoje meno je %s a heslo je %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, "Zlé heslo."); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Text", "abla bla", "Login", "Exit"); } else { gPlayerLogged[playerid] = 1; PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid)); SendClientMessage(playerid,COLOR_RED, "[SYSTEM]:Login prijatý!"); } } return 1; } ERRORRYYY error 017: undefined symbol "pInfo"error 009: invalid array size (negative, zero or out of bounds) Link to comment Share on other sites More sharing options...
0 Mort 29 Odesláno: 1. Září, 2014 Share Odesláno: 1. Září, 2014 Nebylo by od věci zvýraznit řádek s chybou. Link to comment Share on other sites More sharing options...
0 Drifty 0 Odesláno: 1. Září, 2014 Share Odesláno: 1. Září, 2014 Pokuď dobře vidím... enum pInfo { pAdminLevel, pCash, pScore, } Poslední se nezakončuje , BTW stačí číst.. error 017: undefined symbol "pInfo"error 009: invalid array size (negative, zero or out of bounds) Link to comment Share on other sites More sharing options...
0 rhsCZ 19 Odesláno: 1. Září, 2014 Share Odesláno: 1. Září, 2014 já nevím jak to jde vám ale mě compile funguje s čárkou i bez ní Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 2. Září, 2014 Share Odesláno: 2. Září, 2014 Pokuď dobře vidím... enum pInfo { pAdminLevel, pCash, pScore, } Poslední se nezakončuje , BTW stačí číst.. error 017: undefined symbol "pInfo"error 009: invalid array size (negative, zero or out of bounds) On to nepochopí jemu to musíš napísať v kode Link to comment Share on other sites More sharing options...
0 Agent_007 0 Odesláno: 2. Září, 2014 Author Share Odesláno: 2. Září, 2014 Héééééh bo ja taky postich jak ty ne ale aj tak je tám chyba ta ista to je v new PlayerInfo Link to comment Share on other sites More sharing options...
0 rhsCZ 19 Odesláno: 2. Září, 2014 Share Odesláno: 2. Září, 2014 zkus stáhnout znova celé pawno( u windows serveru na sa-mp.com) Link to comment Share on other sites More sharing options...
0 Agent_007 0 Odesláno: 3. Září, 2014 Author Share Odesláno: 3. Září, 2014 Diki moc už to jde :X Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 4. Září, 2014 Share Odesláno: 4. Září, 2014 Héééééh bo ja taky postich jak ty ne ale aj tak je tám chyba ta ista to je v new PlayerInfo Moj mili ta sa ešte nauč písať po Slovenský. Link to comment Share on other sites More sharing options...
0 Agent_007 0 Odesláno: 7. Září, 2014 Author Share Odesláno: 7. Září, 2014 háááááha Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 8. Září, 2014 Share Odesláno: 8. Září, 2014 háááááha Je trapas davať dĺžne tak kde nemajú byť. Link to comment Share on other sites More sharing options...
0 Agent_007 0 Odesláno: 9. Září, 2014 Author Share Odesláno: 9. Září, 2014 hahahahahaha to je zo srandy preofesor fuuuj Link to comment Share on other sites More sharing options...
0 Globální moderátor bug 131 Odesláno: 9. Září, 2014 Globální moderátor Share Odesláno: 9. Září, 2014 hahahahahaha to je zo srandy preofesor fuuuj Preboha... Škoda že koncetraky už niesu... By ta tam aspoň naučili písať a možno by z teba vymlatili aj toho magora Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 10. Září, 2014 Share Odesláno: 10. Září, 2014 hahahahahaha to je zo srandy preofesor fuuuj *Proffesor *fuj Link to comment Share on other sites More sharing options...
0 Agent_007 0 Odesláno: 10. Září, 2014 Author Share Odesláno: 10. Září, 2014 Tak pišeťe že o 2 roky zvás buďe riadiťel školy Panny Proffesory Hah:D Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 11. Září, 2014 Share Odesláno: 11. Září, 2014 Tak pišeťe že o 2 roky zvás buďe riadiťel školy Panny Proffesory Hah:D *Budu Link to comment Share on other sites More sharing options...
Dotaz
Agent_007 0
Link to comment
Share on other sites
15 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