onplayerconnect alatti rész..if(ServerInfo[ConnectMessages] == 1){ new pAKA[256]; pAKA = dini_Get(\"ladmin/config/aka.txt\",tmp3);if (strlen(pAKA) < 3) format(str,sizeof(str),\"{FF0000}>>> {0000FF}%s {33CCFF}(%d) {CDF917}Csatlakozott a szerverhez! {FF0000}<<<\", PlayerName, playerid);else if (!strcmp(pAKA,PlayerName,true)) format(str,sizeof(str),\"{FF0000}>>> {0000FF}%s {33CCFF}(%d) {CDF917}Csatlakozott a szerverhez! {FF0000}<<<\", PlayerName, playerid);else format(str,sizeof(str),\"{FF0000}>>> {0000FF}%s {33CCFF}(%d) {CDF917}Csatlakozott a szerverhez {33CCFF}(Aka: %s) {FF0000}<<<\", PlayerName, playerid, pAKA );for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && playerid != i){ if(PlayerInfo[Level] > 2) SendClientMessage(i,green,str); else { format(string,sizeof(string),\"{FF0000}>>> {0000FF}%s {33CCFF}(%d) {CDF917}Csatlakozott a szerverhez! {FF0000}<<<\", PlayerName, playerid); SendClientMessage(i,yellow,string); }}}//----------------------------------------------------- if (dUserINT(PlayerName2(playerid)).(\"banned\") == 1) { SendClientMessage(playerid, red, \"Ez a név bannolva van a szerverrõl!\");format(string,sizeof(string),\"%s ID:{CDF917}%d Kirúgva. Indok: {FF0000}A neve bannolva van a szerverrõl!\",PlayerName,playerid);SendClientMessageToAll(red, string); print(string);SaveToFile(\"KickLog\",string); Kick(playerid); }//-----------------------------------------------------if(ServerInfo[NameKick] == 1) {for(new s = 0; s < BadNameCount; s++) { if(!strcmp(BadNames,PlayerName,true)) { SendClientMessage(playerid,red, \"A neved feketelistán van, ezért kirúgtak!\"); format(string,sizeof(string),\"%s ID:{0019fc}%d kirúgva. {FF0000}(Indok: Tiltott név)\",PlayerName,playerid); SendClientMessageToAll(red, string); print(string); SaveToFile(\"KickLog\",string); Kick(playerid); return 1; }}}//-----------------------------------------------------if(ServerInfo[PartNameKick] == 1) {for(new s = 0; s < BadPartNameCount; s++) { new pos; while((pos = strfind(PlayerName,BadPartNames,true)) != -1) for(new i = pos, j = pos + strlen(BadPartNames); i < j; i++) { SendClientMessage(playerid,red, \"A neved nincs engedélyezve a szerveren, ezért kirúgtak\"); format(string,sizeof(string),\"%s ID:{0019fc}%d kirúgva. {FF0000}(Indok: Tíltott név)\",PlayerName,playerid); SendClientMessageToAll(red, string); print(string); SaveToFile(\"KickLog\",string); Kick(playerid); return 1; }}}//-----------------------------------------------------if(ServerInfo[Locked] == 1) {PlayerInfo[playerid][AllowedIn] = false;SendClientMessage(playerid,red,\"A szerver zárva! Van 20 másodperced hogy beírd a jelszót, különben kirúgnak!\");SendClientMessage(playerid,red,\"Használd: /password [jelszó]\");LockKickTimer[playerid] = SetTimerEx(\"AutoKick\", 20000, 0, \"i\", playerid);}//-----------------------------------------------------if(strlen(dini_Get(\"ladmin/config/aka.txt\", tmp3)) == 0) dini_Set(\"ladmin/config/aka.txt\", tmp3, PlayerName);else{ if( strfind( dini_Get(\"ladmin/config/aka.txt\", tmp3), PlayerName, true) == -1 ){ format(string,sizeof(string),\"%s,%s\", dini_Get(\"ladmin/config/aka.txt\",tmp3), PlayerName); dini_Set(\"ladmin/config/aka.txt\", tmp3, string);}}//-----------------------------------------------------if(!udb_Exists(PlayerName2(playerid))){ new lstring[256];format(lstring,256,\"{FF0000}Üdv {0019fc}%s!\\n{CDF917}Ez a név még nincs regisztrálva!\\n\\n{057CEA}Írj be egy jelszót a felhasználó létrehozásához:\",pName(playerid));ShowPlayerDialog(playerid,REGISZTRALO,DIALOG_STYLE_PASSWORD,\"Regisztráció\",lstring,\"Regisztrál\",\"Kilép\");}else{ PlayerInfo[playerid][Registered] = 1;format(file,sizeof(file),\"/ladmin/users/%s.sav\",udb_encode(PlayerName));new tmp2[256]; tmp2 = dini_Get(file,\"ip\");if( (!strcmp(tmp3,tmp2,true)) && (ServerInfo[AutoLogin] == 1) ){ LoginPlayer(playerid); if(PlayerInfo[playerid][Level] > 0) { format(string,sizeof(string),\"{0019fc}FELHASZNÁLÓ: {FF0000}Autómatikusan bejelentkeztél! {CDF917}(Admin Szint: {33CCFF}%d)\", PlayerInfo[playerid][Level] ); SendClientMessage(playerid,green,string); } else SendClientMessage(playerid,green,\"{0019fc}FELHASZNÁLÓ: {FF0000}Autómatikusan belelentkeztél, Jó játékot!\"); } else { new lstring[256]; format(lstring,256,\"{0019fc}Üdv {33FF33}%s! {CDF917}Játék elõtt kérlek {FF0000}jelentkezz be:\",pName(playerid)); ShowPlayerDialog(playerid,BEJELENTKEZO,DIALOG_STYLE_PASSWORD,\"Bejelentkezés\",lstring,\"Belépés\",\"Kilépés\");}}return 1;}onplayerdisconnect alatt:if(ServerInfo[ConnectMessages] == 1){switch (reason) { case 0: format(str, sizeof(str), \">>> {0000FF}%s {33CCFF}(%d) {CDF917}Kilépett a szerverrõl {FF0000}(Idõtullépés) <<<\", PlayerName, playerid); case 1: format(str, sizeof(str), \">>> {0000FF}%s {33CCFF}(%d) {CDF917}Kilépett a szerverrõl {FF0000}(Kilépés) <<<\", PlayerName, playerid); case 2: format(str, sizeof(str), \">>> {0000FF}%s {33CCFF}(%d) {CDF917}Kilépett a szerverrõl {FF0000}(Kirúgva/Bannolva) <<<\", PlayerName, playerid);}SendClientMessageToAll(red, str);}if(PlayerInfo[playerid][LoggedIn] == 1) SavePlayer(playerid);if(udb_Exists(PlayerName2(playerid))) dUserSetINT(PlayerName2(playerid)).(\"loggedin\",0); PlayerInfo[playerid][LoggedIn] = 0;PlayerInfo[playerid][Level] = 0;PlayerInfo[playerid][Jailed] = 0;PlayerInfo[playerid][Frozen] = 0;PlayerInfo[playerid][AFKstatus] = 0;if(PlayerInfo[playerid][Jailed] == 1) KillTimer( JailTimer[playerid] );if(PlayerInfo[playerid][Frozen] == 1) KillTimer( FreezeTimer[playerid] );if(ServerInfo[Locked] == 1) KillTimer( LockKickTimer[playerid] );if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]);#if defined ENABLE_SPECfor(new x=0; x<MAX_PLAYERS; x++) if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[specID] == playerid) AdvanceSpectate(x);#endifreturn 1;}
new cvar;public OnPlayerConnect(playerid){cvar++;new str[125], name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name));format(str,sizeof(str),\"%s csatlakozott a szerverre %i/30\",name,cvar);SendClientMessageToAll(9,str);return 1;}public OnPlayerDisconnect(playerid, reason){cvar--;return 1;}