public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == DIALOG_LOGIN) { if(response) { new string[24+4]; format(string,sizeof(string),\"%s.ini\",pName(playerid)); if(!strcmp(password,\"password\") { //bejelentkezett } else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"Az általad megadott jelszó hibás!\\nGépeld be a jelszavad!\", \"Belép\", \"Kilép\"); } else { Kick(playerid); } return 1; } if(dialogid == DIALOG_REGISTER) { if(response) { new string[24+4]; format(string,sizeof(string),\"%s.ini\",pName(playerid)); if((strlen(inputtext) > 5) && (strlen(inputtext) < 33 )) { ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST, \"Milyen nemű a karaktered?\", \"Férfi\\nNő\", \"Tovább\", \"\"); } else ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, \"Regisztráció\", \"A jelszavad legyen 6-32 karakter!\\nKérlek regisztrálj!\\n\\nGépelj be egy jelszavat!\", \"Tovább\", \"\"); } else { Kick(playerid); } return 1; }if(dialogid == DIALOG_SEX) { if(response) { switch(listitem) { case 0: { pInfo[playerid][sex] = 1; ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); } case 1: { pInfo[playerid][sex] = 2; ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); } } } return 1; } if(dialogid == DIALOG_AGE) { if(response) { new age = strval(inputtext); if((age > 20) && (age < 100)) { pInfo[playerid][Age] = age; ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"Gépeld be a jelszavad!\", \"Belép\", \"Kilép\"); } else ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \" \"); } else { Kick(playerid); } return 1; } return 0;}
switch(listitem) { case 0: { pInfo[playerid][sex] = 1; ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); } case 1: { pInfo[playerid][sex] = 2; ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); } }
pInfo[playerid][sex] = listitem+1;ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\");
new string[24+4];
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == DIALOG_LOGIN) { if(response) // If they clicked \'Cancel\' or pressed esc { new string[24+4]; format(string,sizeof(string),\"%s.ini\",pName(playerid)); dfile_Open(string); if(!strcmp(inputtext, dfile_ReadString(\"Password\"))) { pInfo[playerid][Admin] = dfile_ReadInt(\"Admin\"); pInfo[playerid][Logins] = dfile_ReadInt(\"Logins\"); pInfo[playerid][Warns] = dfile_ReadInt(\"Warns\"); pInfo[playerid][PosX] = dfile_ReadFloat(\"PosX\"); pInfo[playerid][PosY] = dfile_ReadFloat(\"PosY\"); pInfo[playerid][PosZ] = dfile_ReadFloat(\"PosZ\"); pInfo[playerid][Money] = dfile_ReadInt(\"Money\"); pInfo[playerid][Kills] = dfile_ReadInt(\"Kills\"); pInfo[playerid][Deaths] = dfile_ReadInt(\"Deaths\"); pInfo[playerid][interior] = dfile_ReadInt(\"Interior\"); pInfo[playerid][skin] = dfile_ReadInt(\"Skin\"); pInfo[playerid][sex] = dfile_ReadInt(\"Sex\"); pInfo[playerid][Age] = dfile_ReadInt(\"Age\"); pInfo[playerid][Money] = dfile_ReadInt(\"Money\"); pInfo[playerid][Kills] = dfile_ReadInt(\"Kills\"); pInfo[playerid][Deaths] = dfile_ReadInt(\"Deaths\"); pInfo[playerid][Wanted] = dfile_ReadInt(\"Wanted\"); pInfo[playerid][Job] = dfile_ReadInt(\"Job\"); pInfo[playerid][LeaderJob] = dfile_ReadInt(\"LeaderJob\"); pInfo[playerid][LeaderRank] = dfile_ReadInt(\"LeaderRank\"); pInfo[playerid][Family] = dfile_ReadInt(\"Family\"); pInfo[playerid][FamilyRank] = dfile_ReadInt(\"FamilyRank\"); pInfo[playerid][CarJacks] = dfile_ReadInt(\"CarJacks\"); pInfo[playerid][JailTime] = dfile_ReadInt(\"JailTime\"); pInfo[playerid][AdminJailTime] = dfile_ReadInt(\"AdminJailTime\"); pInfo[playerid][Joint] = dfile_ReadInt(\"Joint\"); pInfo[playerid][Marihuana] = dfile_ReadInt(\"Marihuana\"); pInfo[playerid][MarihuanaSeed] = dfile_ReadInt(\"MarihuanaSeed\"); pInfo[playerid][Cocaine] = dfile_ReadInt(\"Cocaine\"); pInfo[playerid][Paper] = dfile_ReadInt(\"Paper\"); pInfo[playerid][Lighter] = dfile_ReadInt(\"Lighter\"); GivePlayerMoney(playerid,pInfo[playerid][Money]); LoggedIn[playerid] = true; CarJackTime[playerid] = 5*60; pInfo[playerid][Logins] ++; SpawnPlayer(playerid); if(pInfo[playerid][Admin] == 1) SendClientMessage(playerid,-1,\"Üdvözöllek, admin segéd!\"); if(pInfo[playerid][Admin] == 2) SendClientMessage(playerid,-1,\"Üdvözöllek, admin!\"); if(pInfo[playerid][Admin] == 3) SendClientMessage(playerid,-1,\"Üdvözöllek, főadmin!\"); if(pInfo[playerid][Admin] == 4) SendClientMessage(playerid,-1,\"Üdvözöllek, fejlesztő!\"); if(pInfo[playerid][Admin] == 5) SendClientMessage(playerid,-1,\"Üdvözöllek, tulajdonos!\"); } else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"Az általad megadott jelszó hibás!\\nGépeld be a jelszavad!\", \"Belép\", \"Kilép\"); } else { Kick(playerid); } return 1; } if(dialogid == DIALOG_REGISTER) { if(response) { new string[24+4]; format(string,sizeof(string),\"%s.ini\",pName(playerid)); if((strlen(inputtext) > 5) && (strlen(inputtext) < 33 )) { dfile_Create(string); dfile_Open(string); { dfile_WriteString(\"Password\",inputtext); dfile_WriteInt(\"Admin\",0); dfile_WriteInt(\"Logins\",-1); dfile_WriteInt(\"Warns\",0); dfile_WriteFloat(\"PosX\",0.0); dfile_WriteFloat(\"PosY\",0.0); dfile_WriteFloat(\"PosZ\",0.0); dfile_WriteInt(\"Money\",0); dfile_WriteInt(\"Kills\",0); dfile_WriteInt(\"Deaths\",0); dfile_WriteInt(\"Wanted\",0); dfile_WriteInt(\"Interior\",0); dfile_WriteInt(\"Skin\",1); dfile_WriteInt(\"Sex\",0); dfile_WriteInt(\"Age\",0); dfile_WriteInt(\"Money\",0); dfile_WriteInt(\"Kills\",0); dfile_WriteInt(\"Deaths\",0); dfile_WriteInt(\"Job\",0); dfile_WriteInt(\"LeaderJob\",0); dfile_WriteInt(\"LeaderRank\",0); dfile_WriteInt(\"Family\",0); dfile_WriteInt(\"FamilyRank\",0); dfile_WriteInt(\"CarJacks\",0); dfile_WriteInt(\"JailTime\",0); dfile_WriteInt(\"AdminJailTime\",0); dfile_WriteInt(\"Joint\",0); dfile_WriteInt(\"Marihuana\",0); dfile_WriteInt(\"MarihuanaSeed\",0); dfile_WriteInt(\"Cocaine\",0); dfile_WriteInt(\"Paper\",0); dfile_WriteInt(\"Lighter\",0); ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST, \"Milyen nemű a karaktered?\", \"Férfi\\nNő\", \"Tovább\", \"\"); } dfile_SaveFile(); dfile_CloseFile(); } else ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, \"Regisztráció\", \"A jelszavad legyen 6-32 karakter!\\nKérlek regisztrálj!\\n\\nGépelj be egy jelszavat!\", \"Tovább\", \"\"); } else { Kick(playerid); } return 1; }if(dialogid == DIALOG_SEX) { if(response) // If they clicked \'Cancel\' or pressed esc { switch(listitem) { case 0: { pInfo[playerid][sex] = 1; ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); } case 1: { pInfo[playerid][sex] = 2; ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); } } } return 1; } if(dialogid == DIALOG_AGE) { if(response) { new age = strval(inputtext); if((age > 20) && (age < 100)) { pInfo[playerid][Age] = age; ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"Gépeld be a jelszavad!\", \"Belép\", \"Kilép\"); } else ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \" \"); } else { Kick(playerid); } return 1; } return 0; }
dfile_WriteInt(\"Sex\",0);dfile_WriteInt(\"Age\",0);
public OnPlayerDisconnect(playerid, reason)
if(dialogid == DIALOG_SEX){ if(response) // Ha NEM a \'Mégsére\' klikkel, hanem megadja {new string[28];format(string,sizeof(string),\"%s.ini\",pName(playerid));dfile_Open(string); pInfo[playerid][sex] = listitem+1; dfile_WriteInt(\"Sex\",pInfo[playerid][sex]); ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\");dfile_SaveFile();dfile_CloseFile();} else Kick(playerid);return 1;}if(dialogid == DIALOG_AGE){ if(response) // Ha NEM a \'Mégsére\' klikkel, hanem megadja { if(strval(inputtext) >= 18 && strval(inputtext) < 100) { new string[28]; format(string,sizeof(string),\"%s.ini\",pName(playerid)); dfile_Open(string); pInfo[playerid][Age] = strval(inputtext); dfile_WriteInt(\"Age\",pInfo[playerid][Age]); ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n(21-99)\", \"Tovább\", \"\"); dfile_SaveFile(); dfile_CloseFile(); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"Gépeld be a jelszavad!\", \"Belép\", \"Kilép\");} else ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, \"Karakter adatok\", \"Hány éves a karaktered?\\n{FF0000}(21-99)\", \"Tovább\", \"\");} else Kick(playerid);return 1;}