public OnPlayerConnect(playerid){ banolvaVan(playerid); GetPlayerName(playerid, Name, sizeof(Name)); format(file, sizeof(file), SERVER_USER_FILE, Name); if (!dini_Exists(file)) { ShowPlayerDialog(playerid, REGISZTRAL, DIALOG_STYLE_INPUT, \"Regisztrálás\", \"Üdv, Te még nem regisztráltál, Írj be egy jelszót a regisztráláshoz\", \"Regisztrál\", \"Kilép\"); } if(fexist(file)) { ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, \"Bejelentkezés\", \"Te már regisztrált, jelentkezz be.\", \"Belép\", \"Kilép\");}PlayerInfo[playerid][LoggedIn] = false; PlayerInfo[playerid][Money] = dini_Int(file, \"Money\");PlayerInfo[playerid][bankMoney] = dini_Int(file, \"BankMoney\");PlayerInfo[playerid][Kills] = dini_Int(file, \"Kills\");PlayerInfo[playerid][Deaths] = dini_Int(file, \"Deaths\");PlayerInfo[playerid][MatekWins] = dini_Int(file, \"MatekWins\");PlayerInfo[playerid][ReactionWins] = dini_Int(file, \"ReactionWins\");PlayerInfo[playerid][Days] = dini_Int(file, \"Days\");PlayerInfo[playerid][Hours] = dini_Int(file, \"Hours\");PlayerInfo[playerid][seconds] = dini_Int(file, \"Seconds\");PlayerInfo[playerid][Minutes] = dini_Int(file, \"Minutes\");PlayerInfo[playerid][Posts] = dini_Int(file, \"Posts\"); SetPVarInt(playerid, \" Bortonben \", 0);SetPVarInt(playerid, \" FPS \", 0);SetPVarInt(playerid, \" GOD \", 0);SetPVarInt(playerid, \" CARJUMP\", 1);SetPVarInt(playerid, \" AutoRepair\", 0);SetPVarInt(playerid, \" DMZONA \", 0);SetPVarInt(playerid, \" goto\", 1); PlayerTimer[playerid] = SetTimerEx(\"PlayedTime\", 1000, 1, \"%d\", playerid);UzenetTimer[playerid] = SetTimer(\"Uzenet\", 300000, true); timeR[playerid] = SetTimerEx(\"UpdateCheck\",1000,1,\"%i\",playerid); speedboostonoff[playerid] = false; if(!IsPlayerNPC(playerid)) PlayerCount++; leader[playerid] = 0;new query[150],name[24];GetPlayerName(playerid,name,sizeof(name)); format(query,sizeof(query),\"SELECT `Rank` FROM `leader` WHERE `Name` = \'%s\'\",name); mysql_query(query); mysql_store_result();new intiger = mysql_fetch_int(); leader[playerid] = intiger; mysql_free_result(); players++;GetPlayerIp(playerid, playerip, sizeof(playerip));format(String, sizeof String, \"***{66CC66}%s(%d){00FFFF} {CEE23A}Csatlakozott a szerverhez | {FFAA00}IP: %s | Ország: %s | {FF0000}[%i/%i] \" , pName(playerid),playerid, playerip, GetIpCountry(IP), players, GetMaxPlayers() );SendClientMessage(playerid, 0x00CEE23A, String);SendDeathMessage(INVALID_PLAYER_ID, playerid, 200); Skill[playerid] = true;TextDrawShowForPlayer(playerid, LoginPic); return 1;}
if (dialogid == LOGIN) { 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, \"Login\", \"Te már regisztráltál, jelentkez be.\", \"Login\", \"Kilép\"); new tmp; tmp = dini_Int(file, \"Password\"); if(udb_hash(inputtext) != tmp){ SendClientMessage(playerid, RED, \"Hibás Jelszó\"); Kick(playerid); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, \"Login\", \"Te már regisztráltál, jelentkez be.\", \"Login\", \"Kilép\"); } else { PlayerInfo[playerid][pAdminLevel] = dini_Int(file, \"AdminLevel\"); PlayerInfo[playerid][Money] = dini_Int(file, \"Money\"); PlayerInfo[playerid][bankMoney] = dini_Int(file, \"BankMoney\"); PlayerInfo[playerid][seconds] = dini_Int(file, \"Seconds\"); PlayerInfo[playerid][Minutes] = dini_Int(file, \"Minutes\"); PlayerInfo[playerid][Hours] = dini_Int(file, \"Hours\"); PlayerInfo[playerid][Days] = dini_Int(file, \"Days\"); PlayerInfo[playerid][MatekWins] = dini_Int(file, \"MatekWins\"); PlayerInfo[playerid][ReactionWins] = dini_Int(file, \"ReactionWins\"); PlayerInfo[playerid][Posts] = dini_Int(file, \"Posts\"); PlayerInfo[playerid][Kills] = dini_Int(file, \"Kills\"); PlayerInfo[playerid][Deaths] = dini_Int(file, \"Deaths\"); Save[playerid] = SetTimerEx(\"SavesStats\",1000,true,\"i\",playerid); LoginPlayer(playerid); new sLevel[][]= { \"{FFFFFF} RCON Admin\", \"{375FFF} Kezdõ admin\", \"{CDF917} Próbaidõs Moderátor\", \"{ADFF2F} Moderátor\", \"{33FF33} Fõadmin\", \"{FF0000} Szerver Tulaj\" }; new string[128]; if(PlayerInfo[playerid][pAdminLevel] > 0) { format(string,sizeof(string),\"Sikeresen bejelentkeztél, {FFAA00}Adminszint:{FF0000} %d %s\", PlayerInfo[playerid][pAdminLevel], sLevel[PlayerInfo[playerid][pAdminLevel]]); return SendClientMessage(playerid, ORANGE, string); } else return SendClientMessage(playerid, YELLOW, \"[sZERVER]: Sikeres bejelentkezés\");}}
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, \"AdminLevel\");ez hol van még?