if(dialogid == regisztracio){ if(response) { if(!Regged[playerid]) { new file[256]; new pip[32]; GetPlayerIp(playerid,pip,sizeof(pip)); if(strlen(inputtext) == 0) { ShowPlayerDialog(playerid,regisztracio,DIALOG_STYLE_INPUT,\"Regisztráció\", \"Add meg a jelszavad!\", \"Mehet\", \"Mégse\"); return 0; } format(file,sizeof(file),\"/Karakterek/%s.ini\",nev); if(!fexist(file)) { dini_Create(file); dini_IntSet(file,\"Antibug\",0); dini_Set(file,\"IP\",pip); dini_IntSet(file,\"Jelszo\",udb_hash(inputtext)); dini_IntSet(file,\"Admin\",0); dini_IntSet(file,\"Moderator\",0); dini_IntSet(file,\"Frakcio\",0); dini_IntSet(file,\"Frakcioleader\",0); dini_IntSet(file,\"TEKleader\",0); dini_IntSet(file,\"Rang\",0); dini_IntSet(file,\"Munka\",0); dini_IntSet(file,\"Penz\",0); dini_IntSet(file,\"Szint\",0); dini_IntSet(file,\"Civilruha\",0); dini_IntSet(file,\"Munkaruha\",0); dini_IntSet(file,\"Banned\",0); dini_IntSet(file,\"Muted\",0); dini_IntSet(file,\"Warn\",0); dini_IntSet(file,\"Korhaz\",0); dini_FloatSet(file,\"PosX\",1685.5725); dini_FloatSet(file,\"PosY\",-2331.7192); dini_FloatSet(file,\"PosZ\",13.5469); dini_IntSet(file,\"Int\",0); dini_FloatSet(file,\"MarkPosX\",0); dini_FloatSet(file,\"MarkPosY\",0); dini_FloatSet(file,\"MarkPosZ\",0); dini_IntSet(file,\"MarkInt\",0); ShowPlayerDialog(playerid,bejelentkezes,DIALOG_STYLE_INPUT,\"Bejelentkezés\", \"Add meg a jelszavad!\", \"Mehet\", \"Mégse\"); getdate(ev,honap,nap); gettime(ora,perc,masodperc); format(logstring,sizeof(logstring),\"[%d-%d-%d_%d:%d:%d] %s regisztrált a szerverre\",ev,honap,nap,ora,perc,masodperc,nev); SzerverLog(logstring); } else ShowPlayerDialog(playerid,bejelentkezes,DIALOG_STYLE_INPUT,\"Bejelentkezés\", \"Add meg a jelszavad!\", \"Mehet\", \"Mégse\"); } else ShowPlayerDialog(playerid,bejelentkezes,DIALOG_STYLE_INPUT,\"Bejelentkezés\", \"Add meg a jelszavad!\", \"Mehet\", \"Mégse\"); }}if(dialogid == bejelentkezes){ if(response) { if(Regged[playerid]) { new file[128]; if(strlen(inputtext) == 0) { ShowPlayerDialog(playerid,bejelentkezes,DIALOG_STYLE_INPUT,\"Bejelentkezés\", \"Add meg a jelszavad!\", \"Mehet\", \"Mégse\"); return 0; } if(fexist(file)) { new jelszo = dini_Int(file, \"Jelszo\"); if(udb_hash(inputtext) == jelszo) { Logged[playerid] = 1; PlayerInfo[playerid][Admin] = dini_Int(file,\"Admin\"); PlayerInfo[playerid][Moderator] = dini_Int(file,\"Moderator\"); PlayerInfo[playerid][Frakcio] = dini_Int(file,\"Frakcio\"); PlayerInfo[playerid][Frakcioleader] = dini_Int(file,\"Frakcioleader\"); PlayerInfo[playerid][TEKleader] = dini_Int(file,\"TEKleader\"); PlayerInfo[playerid][Rang] = dini_Int(file,\"Rang\"); PlayerInfo[playerid][Munka] = dini_Int(file,\"Munka\"); PlayerInfo[playerid][Penz] = dini_Int(file,\"Penz\"); PlayerInfo[playerid][szint] = dini_Int(file,\"Szint\"); PlayerInfo[playerid][Civilruha] = dini_Int(file,\"Civilruha\"); PlayerInfo[playerid][Munkaruha] = dini_Int(file,\"Munkaruha\"); PlayerInfo[playerid][banned] = dini_Int(file,\"Banned\"); PlayerInfo[playerid][Muted] = dini_Int(file,\"Muted\"); PlayerInfo[playerid][Warn] = dini_Int(file,\"Warn\"); PlayerInfo[playerid][Korhaz] = dini_Int(file,\"Korhaz\"); PlayerInfo[playerid][PosX] = dini_Float(file,\"PosX\"); PlayerInfo[playerid][PosY] = dini_Float(file,\"PosY\"); PlayerInfo[playerid][PosZ] = dini_Float(file,\"PosZ\"); PlayerInfo[playerid][int] = dini_Int(file,\"Int\"); PlayerInfo[playerid][MarkPosX] = dini_Float(file,\"MarkPosX\"); PlayerInfo[playerid][MarkPosY] = dini_Float(file,\"MarkPosY\"); PlayerInfo[playerid][MarkPosZ] = dini_Float(file,\"MarkPosZ\"); PlayerInfo[playerid][MarkInt] = dini_Int(file,\"MarkInt\"); SpawnPlayer(playerid); SendClientMessage(playerid,GREEN,\"(( Sikeresen bejelentkeztél! ))\"); SaveTimer[playerid] = SetTimerEx(\"SaveAccounts\",900000,true,\"i\",playerid); } else { SendClientMessage(playerid,DARKRED,\"(( Hibás jelszó! ))\"); getdate(ev,honap,nap); gettime(ora,perc,masodperc); format(logstring,sizeof(logstring),\"[%d-%d-%d_%d:%d:%d] %s ki lett kickelve. Oka: Hibás jelszót adott meg!\",ev,honap,nap,ora,perc,masodperc,nev); SzerverLog(logstring); TimeKickMe(playerid); } } else ShowPlayerDialog(playerid,regisztracio,DIALOG_STYLE_INPUT,\"Regisztráció\", \"Add meg a jelszavad!\", \"Mehet\", \"Mégse\"); } } else Kick(playerid);}
mysql_format(mysqlkapcsolat,query,384,\"UPDATE Karakterek SET Admin=\'%d\',Moderator=\'%d\',Frakcio=\'%d\',Frakcioleader=\'%d\',Rang=\'%d\',Munka=\'%d\',Penz=\'%d\',Szint=\'%d\',Civilruha=\'%d\',Munkaruha=\'%d\',Banned=\'%d,Muted=\'%d\',Warn=\'%d\',Korhaz=\'%d\',PosX=\'%f\',PosY=\'%f\',PosZ=\'%f\',PosInt=\'%d\',MarkPosX=\'%f\',MarkPosY=\'%f\',MarkPosZ=\'%f\',MarkPosInt=\'%d\' WHERE Nev=\'%s\'\",PlayerInfo[playerid][Admin],PlayerInfo[playerid][Moderator],PlayerInfo[playerid][Frakcio],PlayerInfo[playerid][Frakcioleader],PlayerInfo[playerid][Rang],PlayerInfo[playerid][Munka],PlayerInfo[playerid][Penz],PlayerInfo[playerid][Civilruha],PlayerInfo[playerid][Munkaruha],PlayerInfo[playerid][banned],PlayerInfo[playerid][Muted],PlayerInfo[playerid][Warn],PlayerInfo[playerid][Korhaz],PlayerInfo[playerid][PosX],PlayerInfo[playerid][PosY],PlayerInfo[playerid][PosZ],PlayerInfo[playerid][PosInt],PlayerInfo[playerid][MarkPosX],PlayerInfo[playerid][MarkPosY],PlayerInfo[playerid][MarkPosZ],PlayerInfo[playerid][MarkPosInt],PlayerInfo[playerid][Nev]);
format(query,sizeof(query),\"INSERT INTO Karakterek(Nev,Admin,Moderator,Frakcio,Frakcioleader,Rang,Munka,Penz,Szint,Civilruha,Munkaruha,Banned,Muted,Warn,Korhaz,PosX,PosY,PosZ,PosInt,MarkPosX,MarkPosY,MarkPosZ,MarkInt) VALUES (\'%s\',%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%f,%f,%d,%f,%f,%f,%d)\",PlayerInfo[playerid][Nev],PlayerInfo[playerid][Admin],PlayerInfo[playerid][Moderator],PlayerInfo[playerid][Frakcio],PlayerInfo[playerid][Frakcioleader],PlayerInfo[playerid][Rang],PlayerInfo[playerid][Munka],PlayerInfo[playerid][Penz],PlayerInfo[playerid][Civilruha],PlayerInfo[playerid][Munkaruha],PlayerInfo[playerid][banned],PlayerInfo[playerid][Muted],PlayerInfo[playerid][Warn],PlayerInfo[playerid][Korhaz],PlayerInfo[playerid][PosX],PlayerInfo[playerid][PosY],PlayerInfo[playerid][PosZ],PlayerInfo[playerid][PosInt],PlayerInfo[playerid][MarkPosX],PlayerInfo[playerid][MarkPosY],PlayerInfo[playerid][MarkPosZ],PlayerInfo[playerid][MarkPosInt]);