switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","Type your password below to register a new account.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Banned",0); new rp = 100000 + random(899999); INI_WriteInt(File, "Number", PlayerInfo[playerid][pNumber] = rp); INI_WriteInt(File,"Age",0); INI_WriteInt(File,"ADuty",0); INI_WriteInt(File,"VIP",0); INI_WriteInt(File,"Group",0); INI_WriteInt(File,"Skin",0); INI_WriteInt(File,"Authenticated",0); INI_WriteFloat(File,"Health",100); INI_WriteFloat(File,"Armour",0); INI_Close(File); ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST, "Sex","Male\nFemale","OK","OK"); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Success!","You have successfully logged in!","Ok",""); SetPlayerPos(playerid, PlayerInfo[playerid][LastX], PlayerInfo[playerid][LastY], PlayerInfo[playerid][LastZ]); SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pAngle]); SetPlayerHealth(playerid, PlayerInfo[playerid][Health]); SetPlayerArmour(playerid, PlayerInfo[playerid][Armour]); SetCameraBehindPlayer(playerid); SpawnPlayer(playerid); new string[128]; format(string, sizeof(string), "Welcome back to Green Light Role Play, %s!", GetName(playerid)); SendClientMessage(playerid, COLOR_BRIGHTRED, string); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login"," You have entered an incorrect password. Type your password below to login.","Login","Quit"); } return 1; } } case DIALOG_WEAPONS: { if(!response) return 1; switch (listitem) { case 0: { GivePlayerWeapon(playerid, 22, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Pistol"); } case 1: { GivePlayerWeapon(playerid, 23, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Silenced Pistol"); } case 2: { GivePlayerWeapon(playerid, 24, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Desert Eagle "); } case 3: { GivePlayerWeapon(playerid, 25, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Pump Action Shotgun"); } case 4: { GivePlayerWeapon(playerid, 26, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Sawn-off Shotgun"); } case 5: { GivePlayerWeapon(playerid, 27, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Combat Shotgun"); } case 6: { GivePlayerWeapon(playerid, 28, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Uzi"); } case 7: { GivePlayerWeapon(playerid, 29, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a MP5"); } case 8: { GivePlayerWeapon(playerid, 32, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a Tec-9"); } case 9: { GivePlayerWeapon(playerid, 30, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a AK-47"); } case 10: { GivePlayerWeapon(playerid, 31, 1000); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved a M4"); } case 11: { SetPlayerArmour(playerid, 100); SendClientMessage(playerid, COLOR_YELLOW, "You have recieved 100 Armour"); } } } case DIALOG_TELEPORTS: { if(!response) return 1; switch (listitem) { case 0: { SetPlayerPos(playerid,2477.6348,-1661.5591,13.3438); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Grove"); } case 1: { SetPlayerPos(playerid,1129.0291,-1439.5515,15.7969); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Mall"); } case 2: { SetPlayerPos(playerid,1420.6703,-812.9760,73.2445); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Vinewood"); } case 3: { SetPlayerPos(playerid,1976.1837,-2545.1575,13.5469); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to LS Airport"); } case 4: { SetPlayerPos(playerid,1970.5631,-1196.6450,25.6799); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Glen Park"); } case 5: { SetPlayerPos(playerid,1933.1505,-1760.5665,13.5469); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Idlewood"); } case 6: { SetPlayerPos(playerid,1743.1366,-1861.7894,13.5771); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Unity Station"); } case 7: { SetPlayerPos(playerid,1176.2925,-1323.4983,14.0141); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to All Saints Hospital"); } case 8: { SetPlayerPos(playerid,2030.5526,-1418.3025,16.9922); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to County General"); } case 9: { SetPlayerPos(playerid,1357.7419,-1280.7751,13.2888); SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Ammu Nation"); } } } case DIALOG_ACCENT: { if(!response) return 1; switch (listitem) { case 0: { PlayerInfo[playerid][pAccent] = 1; SendClientMessage(playerid, COLOR_YELLOW, "You now have an American accent"); LoginPlayer(playerid); } case 1: { PlayerInfo[playerid][pAccent] = 2; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Chinese accent"); LoginPlayer(playerid); } case 2: { PlayerInfo[playerid][pAccent] = 3; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Australian accent"); LoginPlayer(playerid); } case 3: { PlayerInfo[playerid][pAccent] = 4; SendClientMessage(playerid, COLOR_YELLOW, "You now have an British accent"); LoginPlayer(playerid); } case 4: { PlayerInfo[playerid][pAccent] = 5; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Gangsta accent"); LoginPlayer(playerid); } case 5: { PlayerInfo[playerid][pAccent] = 6; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Swedish accent"); LoginPlayer(playerid); } case 6: { PlayerInfo[playerid][pAccent] = 7; SendClientMessage(playerid, COLOR_YELLOW, "You now have an African accent"); LoginPlayer(playerid); } case 7: { PlayerInfo[playerid][pAccent] = 8; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Jamaican accent"); LoginPlayer(playerid); } case 8: { PlayerInfo[playerid][pAccent] = 9; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Japanese accent"); LoginPlayer(playerid); } case 9: { PlayerInfo[playerid][pAccent] = 10; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Italian accent"); LoginPlayer(playerid); } case 10: { PlayerInfo[playerid][pAccent] = 11; SendClientMessage(playerid, COLOR_YELLOW, "You now have an French accent"); LoginPlayer(playerid); } case 11: { PlayerInfo[playerid][pAccent] = 12; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Greek accent"); LoginPlayer(playerid); } case 12: { PlayerInfo[playerid][pAccent] = 13; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Spanish accent"); LoginPlayer(playerid); } case 13: { PlayerInfo[playerid][pAccent] = 14; SendClientMessage(playerid, COLOR_YELLOW, "You now have an Mexican accent"); LoginPlayer(playerid); } } } case DIALOG_SEX: { if(!response) return 1; switch (listitem) { case 0: { PlayerInfo[playerid][pSex] = 1; SendClientMessage(playerid, COLOR_YELLOW, "So you are Male"); ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age","How old is your character?","Next","Leave Game"); } case 1: { PlayerInfo[playerid][pSex] = 2; SendClientMessage(playerid, COLOR_YELLOW, "So you are Female"); ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT,"Age","How old is your character?","Next","Leave"); } } } case DIALOG_AGE: { if(!response) return 1; PlayerInfo[playerid][pAge] = strval(inputtext); new string[64]; format(string, sizeof(string),"So you are %s years old", inputtext); SendClientMessage(playerid, COLOR_YELLOW, string); ShowPlayerDialog(playerid, DIALOG_ACCENT, DIALOG_STYLE_LIST,"Age","American\nChinese\nAustralian\nBritish\nGangsta\nSwedish\nAfrican\nJamaican\nJapanese\nItalian\nFrench\nGreek\nSpanish\nMexican","Next","Leave"); if(strval(inputtext) <= 15) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: We only allow 15-70"); ShowPlayerDialog(playerid,DIALOG_AGE,DIALOG_STYLE_INPUT,"Age","How old is your character?","Next","Leave"); return 1; } if(strval(inputtext) >= 70) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: We only allow 15-70"); ShowPlayerDialog(playerid,DIALOG_AGE,DIALOG_STYLE_INPUT,"Age","How old is your character?","Next","Leave"); return 1; } } } return 1;