CMD:register(playerid, params[]){new PlayerName[MAX_PLAYER_NAME];new password[64];new iPlayer;GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);if(IsLogged[playerid] == 0){if(sscanf(params, \"s[64]\", password)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /register [jelszo]\");else{format(file, sizeof(file), \"%s.ini\", PlayerName);if(!dini_Exists(file)){dini_Create(file);dini_IntSet(file, \"Jelszó\", udb_hash(password));dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Adminszint\",GetPVarInt( iPlayer, \"Level\" ));dini_IntSet(file, \"Kills\",GetPVarInt(iPlayer,\"Kill\"));dini_IntSet(file, \"Death\",GetPVarInt(iPlayer,\"Death\"));SendClientMessage(playerid, COLOR_GREEN, \"Sikeresen regisztráltál, /login a belépéshez.\");}else{SendClientMessage(playerid, COLOR_RED, \"Ezzel a névvel már regisztráltak\");}}}else{SendClientMessage(playerid, COLOR_RED, \"Te már regisztrálva vagy!\");}return 1;}CMD:login(playerid, params[]){new PlayerName[MAX_PLAYER_NAME];GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);if(IsLogged[playerid] == 0){new password[64];if(sscanf(params, \"s[64]\", password)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /login [jelszó]\");else{format(file, sizeof(file), \"%s.ini\", PlayerName);if(dini_Exists(file)){if(strval(dini_Get(file, \"Jelszó\")) == udb_hash(password)){GivePlayerMoney(playerid, dini_Int(file, \"Pénz\"));SetPlayerScore(playerid, dini_Int(file, \"Pont\"));SetPVarInt(playerid, \"Admin\", dini_Int(file, \"Admin\"));SetPVarInt(playerid, \"Kill\", dini_Int(file, \"Kills\"));SetPVarInt(playerid, \"Death\", dini_Int(file, \"Death\"));IsLogged[playerid] = 1;SendClientMessage(playerid, COLOR_GREEN, \"Sikeresen bejelentkeztél\");}else{SendClientMessage(playerid, COLOR_RED, \"Rossz jelszó!\");}}else{SendClientMessage(playerid, COLOR_RED, \"Elõször regisztrálj : /register \");}}}else{SendClientMessage(playerid, COLOR_RED, \"Te már bevagy jelentkezve!\");}return 1;}public OnPlayerConnect(playerid){new iPlayer;SetPVarInt(playerid,\"Kills\",GetPVarInt(playerid, \"Kill\"));SetPVarInt(playerid,\"Death\",GetPVarInt(playerid, \"Death\"));SetPVarInt(playerid,\"Admin\",GetPVarInt(iPlayer,\"Level\"));return 1;}public OnPlayerDisconnect(playerid, reason){newiPlayer;dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Kills\",GetPVarInt(playerid, \"Kill\"));dini_IntSet(file, \"Death\",GetPVarInt(playerid, \"Death\"));dini_IntSet(file, \"Admin\", GetPVarInt( iPlayer, \"Level\" ));IsLogged[playerid] = 0;return 1;}
Üdv. Abba szeretném kérni a segítségeteket hogy nem tölti be az admin-tValaki tudja mért?Kód: CMD:register(playerid, params[]){new PlayerName[MAX_PLAYER_NAME];new password[64];GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);if(IsLogged[playerid] == 0){if(sscanf(params, \"s[64]\", password)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /register [jelszo]\");else{format(file, sizeof(file), \"%s.ini\", PlayerName);if(!dini_Exists(file)){dini_Create(file);dini_IntSet(file, \"Jelszó\", udb_hash(password));dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Adminszint\",GetPVarInt( playerid, \"Level\" ));dini_IntSet(file, \"Kills\",GetPVarInt(playerid,\"Kill\"));dini_IntSet(file, \"Death\",GetPVarInt(playerid,\"Death\"));SendClientMessage(playerid, COLOR_GREEN, \"Sikeresen regisztráltál, /login a belépéshez.\");}else{SendClientMessage(playerid, COLOR_RED, \"Ezzel a névvel már regisztráltak\");}}}else{SendClientMessage(playerid, COLOR_RED, \"Te már regisztrálva vagy!\");}return 1;}CMD:login(playerid, params[]){new PlayerName[MAX_PLAYER_NAME];GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);if(IsLogged[playerid] == 0){new password[64];if(sscanf(params, \"s[64]\", password)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /login [jelszó]\");else{format(file, sizeof(file), \"%s.ini\", PlayerName);if(dini_Exists(file)){if(strval(dini_Get(file, \"Jelszó\")) == udb_hash(password)){GivePlayerMoney(playerid, dini_Int(file, \"Pénz\"));SetPlayerScore(playerid, dini_Int(file, \"Pont\"));SetPVarInt(playerid, \"Level\", dini_Int(file, \"Admin\"));SetPVarInt(playerid, \"Kill\", dini_Int(file, \"Kills\"));SetPVarInt(playerid, \"Death\", dini_Int(file, \"Death\"));IsLogged[playerid] = 1;SendClientMessage(playerid, COLOR_GREEN, \"Sikeresen bejelentkeztél\");}else{SendClientMessage(playerid, COLOR_RED, \"Rossz jelszó!\");}}else{SendClientMessage(playerid, COLOR_RED, \"Elõször regisztrálj : /register \");}}}else{SendClientMessage(playerid, COLOR_RED, \"Te már bevagy jelentkezve!\");}return 1;}public OnPlayerConnect(playerid){SetPVarInt(playerid,\"Kills\",GetPVarInt(playerid, \"Kill\"));SetPVarInt(playerid,\"Death\",GetPVarInt(playerid, \"Death\"));SetPVarInt(playerid,\"Level\",dini_Int(file,\"Admin\"));return 1;}public OnPlayerDisconnect(playerid, reason){dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Kills\",GetPVarInt(playerid, \"Kill\"));dini_IntSet(file, \"Death\",GetPVarInt(playerid, \"Death\"));dini_IntSet(file, \"Admin\", GetPVarInt( playerid, \"Level\" ));IsLogged[playerid] = 0;return 1;}
CMD:register(playerid, params[]){new PlayerName[MAX_PLAYER_NAME];new password[64];GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);if(IsLogged[playerid] == 0){if(sscanf(params, \"s[64]\", password)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /register [jelszo]\");else{format(file, sizeof(file), \"%s.ini\", PlayerName);if(!dini_Exists(file)){dini_Create(file);dini_IntSet(file, \"Jelszó\", udb_hash(password));dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Adminszint\",GetPVarInt( playerid, \"Level\" ));dini_IntSet(file, \"Kills\",GetPVarInt(playerid,\"Kill\"));dini_IntSet(file, \"Death\",GetPVarInt(playerid,\"Death\"));SendClientMessage(playerid, COLOR_GREEN, \"Sikeresen regisztráltál, /login a belépéshez.\");}else{SendClientMessage(playerid, COLOR_RED, \"Ezzel a névvel már regisztráltak\");}}}else{SendClientMessage(playerid, COLOR_RED, \"Te már regisztrálva vagy!\");}return 1;}CMD:login(playerid, params[]){new PlayerName[MAX_PLAYER_NAME];GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);if(IsLogged[playerid] == 0){new password[64];if(sscanf(params, \"s[64]\", password)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /login [jelszó]\");else{format(file, sizeof(file), \"%s.ini\", PlayerName);if(dini_Exists(file)){if(strval(dini_Get(file, \"Jelszó\")) == udb_hash(password)){GivePlayerMoney(playerid, dini_Int(file, \"Pénz\"));SetPlayerScore(playerid, dini_Int(file, \"Pont\"));SetPVarInt(playerid, \"Level\", dini_Int(file, \"Admin\"));SetPVarInt(playerid, \"Kill\", dini_Int(file, \"Kills\"));SetPVarInt(playerid, \"Death\", dini_Int(file, \"Death\"));IsLogged[playerid] = 1;SendClientMessage(playerid, COLOR_GREEN, \"Sikeresen bejelentkeztél\");}else{SendClientMessage(playerid, COLOR_RED, \"Rossz jelszó!\");}}else{SendClientMessage(playerid, COLOR_RED, \"Elõször regisztrálj : /register \");}}}else{SendClientMessage(playerid, COLOR_RED, \"Te már bevagy jelentkezve!\");}return 1;}public OnPlayerConnect(playerid){SetPVarInt(playerid,\"Kills\",GetPVarInt(playerid, \"Kill\"));SetPVarInt(playerid,\"Death\",GetPVarInt(playerid, \"Death\"));SetPVarInt(playerid,\"Level\",dini_Int(file,\"Admin\"));return 1;}public OnPlayerDisconnect(playerid, reason){dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Kills\",GetPVarInt(playerid, \"Kill\"));dini_IntSet(file, \"Death\",GetPVarInt(playerid, \"Death\"));dini_IntSet(file, \"Admin\", GetPVarInt( playerid, \"Level\" ));IsLogged[playerid] = 0;return 1;}