Error 014: Invalid statement
#1

So, just a little information about what the script is suppose to do, I made the script as an admin menu (Do commands inside the dialogs), but the last Response i added seems to give me errors, it is the same as the rest but still it gives errors.

I have been search ways to fix it but the ways i tried didn't seem to change anything.

Код:
C:\Users\Corey\Desktop\SAMP\Scripts\Gamemodes\new Gm\gamemodes\GM.pwn(9464) : error 014: invalid statement; not in switch
C:\Users\Corey\Desktop\SAMP\Scripts\Gamemodes\new Gm\gamemodes\GM.pwn(9464) : warning 215: expression has no effect
C:\Users\Corey\Desktop\SAMP\Scripts\Gamemodes\new Gm\gamemodes\GM.pwn(9464) : error 001: expected token: ";", but found ":"
C:\Users\Corey\Desktop\SAMP\Scripts\Gamemodes\new Gm\gamemodes\GM.pwn(9464) : error 029: invalid expression, assumed zero
C:\Users\Corey\Desktop\SAMP\Scripts\Gamemodes\new Gm\gamemodes\GM.pwn(9464) : fatal error 107: too many error messages on one line
This is also the Response for it.

Код:
  		case DIALOG_AMENU5: // Score set ((Also line 9464))
	{
		if(response)
		{
			targetID = strval(inputtext);
			if(IsPlayerConnected(targetID))
			{
				ShowPlayerDialog(playerid, DIALOG_AMENU5A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the player id, you want the code to effect.", "Next", "Close");				return 1;
			}
			else
			{
				SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
				return 1;
			}
		}
		else if(!response)
		{
			SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
		}
	}
This one is just suppose to make the admin enter in the ID of the player they want the command to do to them.
Reply
#2

Post its above case too because it probably uses extra bracket and the above code is out of the switch statement.
Reply
#3

Are you sure it's in a switch ?
As the first error says that.. Make sure of every bracket or post the whole OnDialogResponse
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Post its above case too because it probably uses extra bracket and the above code is out of the switch statement.
Above one.
Код:
  		case DIALOG_AMENU4A: // Skin set 2
	{
			if(response)
        {
            new skinid, message[64];
            skinid = strval(inputtext);
            if(skinid < 0 || skinid > 299)
            {
                SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
            }
            else
            {
                SetPlayerSkin(targetID, skinid);
                format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, skinid);
                SendClientMessage(playerid, 0x33FF33AA, message);
            }
        }
Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
Are you sure it's in a switch ?
As the first error says that.. Make sure of every bracket or post the whole OnDialogResponse
The whole dialogresponse is quite big.

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
		switch(dialogid)
	{
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""EMBED_WHITE"Registering",""EMBED_RED"You have entered an invalid password.\n"EMBED_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                
                new BannedBy[26], BanReason[26];
    			format(string2, sizeof(string2), "None");
				strmid(BannedBy, string2, 0, strlen(string2), 255);

				format(string2, sizeof(string2), "None");
				strmid(BanReason, string2, 0, strlen(string2), 255);
                
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_SetTag(File,"Offensive Record");
                INI_WriteString(File,"BannedBy",BannedBy);
                INI_WriteString(File,"BanReason",BanReason);
                INI_SetTag(File,"User's statistics");
                INI_WriteInt(File,"Cash",1000);
    			INI_WriteInt(File,"Level",1);
       			INI_WriteFloat(File,"Health",100);
                INI_Close(File);
                pInfo[playerid][pCash] = 1000;
                
                GivePlayerMoney(playerid, pInfo[playerid][pCash]);
                ShowPlayerDialog(playerid, DIALOG_REGISTER_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Choose", "");
            }
        }
        case DIALOG_HELP:
        {
            if (!response) return 1;
            if(listitem == 0) // General
            {
                ShowPlayerDialog(playerid, DIALOG_HELP_GENERAL, DIALOG_STYLE_MSGBOX, "General Help", "/me /do /\n/credits /jobs /killcp /killcheckpoint", "Ok", "");
            }
            if(listitem == 1) // Chat
            {
                ShowPlayerDialog(playerid, DIALOG_HELP_CHAT, DIALOG_STYLE_MSGBOX, "Chat Help", "/b [local chat]\n /n [server realted questions]\n /o [Text]", "Ok", "");
            }
            if(listitem == 2) // Faction
            {
                if(pInfo[playerid][pMember] == 0)
				{
					SendClientMessage(playerid, COLOR_GREY, "	You are not in a faction"); return 1;
				}
                if(pInfo[playerid][pLeader] >= 1)
				{
				    if(pInfo[playerid][pMember] == 1)
				    {
						ShowPlayerDialog(playerid, DIALOG_HELP_FACTION, DIALOG_STYLE_MSGBOX, "LSPD HC", "/radio | /namerank | /giverank | /cuff | /uncuff | /tazer", "Ok", "");
					}
					else
					{
					    SendClientMessage(playerid, COLOR_BLUE, "	You are not in an active faction");
					}
				}
                else
				{
				    if(pInfo[playerid][pMember] == 1)
				    {
						ShowPlayerDialog(playerid, DIALOG_HELP_FACTION, DIALOG_STYLE_MSGBOX, "LEO Commands", "/radio, /tazer, /cuff /uncuff ", "Ok", "");
					}
					else
					{
					    SendClientMessage(playerid, COLOR_BLUE, "	You are not in an active faction");
					}
				}
            }
        }
        case DIALOG_DOOR:
		{
	    	if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
	    	if(!response) return 1;
	    	else
	    	{
                ShowPlayerDialog(playerid, DIALOG_DOOR2, DIALOG_STYLE_LIST, "Edit door", "Interior\nExterior", "Choose", "Cancel");
			}
		}
		case DIALOG_DOOR_EDIT_NAME:
		{
		    if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
	    	if(!response) return 1;
	    	
	  		new doorid = DoorID[playerid];
	  		
	  		Delete3DTextLabel(DoorRefText[doorid]);
	  		
	  		
	  		format(string2, sizeof(string2), "%s", inputtext);
			strmid(dInfo[doorid][dName], string2, 0, strlen(string2), 255);
			
			new doornametext[128];
			format(doornametext, sizeof(doornametext), "%s\n\nType /enter to go inside.", dInfo[doorid][dName]);

        	Delete3DTextLabel(DoorRefText[doorid]);
        	DoorRefText[doorid] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, dInfo[doorid][oPosX], dInfo[doorid][oPosY], dInfo[doorid][oPosZ]+0.75, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, dInfo[doorid][oVW], dInfo[doorid][oInterior]);
		
		}
		case DIALOG_DOOR2:
		{
		    if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
	    	if(!response) return 1;

            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_DOOR_EDIT_NAME, DIALOG_STYLE_INPUT, "Edit Door Name", "Please enter the door name below:", "Okay", "Cancel");
            }
	    	if(listitem == 1) // INterior
            {
                Edittingdoor[playerid] = 1;
                SendClientMessage(playerid, COLOR_GREY, "	Write /ddone to confirm the interior position");
            }
            if(listitem == 2) // Exterior
            {
                Edittingdoor[playerid] = 2;
                SendClientMessage(playerid, COLOR_GREY, "	Write /ddone to confirm the exterior position");
            }

		}
		case DIALOG_DOOR_EDIT:
		{
		    if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
	    	if(!response) return 1;
	    	else
	    	{
	    	    if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");

		        if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");

	    	    new ident = strval(inputtext);
	    	    DoorID[playerid] = ident;

	    	    ShowPlayerDialog(playerid, DIALOG_DOOR2, DIALOG_STYLE_LIST, "Edit door", "Door Name\nInterior\nExterior", "Choose", "Cancel");
	    	}
		}
		case DIALOG_DOOR_ADD:
		{
	    	if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
	    	if(!response) return 1;
	    	else
	    	{
	    	    new Float:X, Float:Y, Float:Z, Float:Angle;
	    	    GetPlayerPos(playerid, X, Y, Z);
	        	if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");

		        if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");

				new ident = strval(inputtext);
				if(ident > 10 || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");

				if(ident < 1 || ident > 20) return SendClientMessage(playerid, COLOR_GREY, "   Door id range between [1-20]");

				format(string2, sizeof(string2), "%d", dInfo[ident][dTaken]);
				if(strcmp(string2, "0", true) != 0)
					return SendClientMessage(playerid, COLOR_GRAD1, "That door ID is already in use.");

				DoorID[playerid] = ident;
				
				format(string2, sizeof(string2), "None");
				strmid(dInfo[ident][dName], string2, 0, strlen(string2), 255);

				dInfo[ident][oPosX] = X;
	   	 		dInfo[ident][oPosY] = Y;
	    		dInfo[ident][dTaken] = 1;
	    		dInfo[ident][oPosA] = GetPlayerFacingAngle(playerid, Angle);
	    		dInfo[ident][oPosZ] = Z;
				dInfo[ident][oVW] = GetPlayerVirtualWorld(playerid);
				dInfo[ident][oInterior] = GetPlayerInterior(playerid);
                dInfo[ident][iVW] = ident;

				new doornametext[128];
				format(doornametext, sizeof(doornametext), "Type /enter to go inside.");
				DoorRefText[ident] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, dInfo[ident][oPosX], dInfo[ident][oPosY], dInfo[ident][oPosZ]+0.75, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, dInfo[ident][oVW], dInfo[ident][oInterior]);

				DoorRef[ident] = CreateDynamicPickup(1239, 23, dInfo[ident][oPosX], dInfo[ident][oPosY], dInfo[ident][oPosZ], dInfo[ident][oVW]);

				SaveDoors();

			}
		}
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == pInfo[playerid][pPass])
                {
                    GivePlayerMoney(playerid, pInfo[playerid][pCash]);
                    TogglePlayerSpectating(playerid, false);
                    gPlayerLogged[playerid] = 1;
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""EMBED_WHITE"Login",""EMBED_RED"You have entered an incorrect password.\n"EMBED_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
		case DIALOG_REGISTER_AGE:
		{
		    if(response)
        	{
				if(strval(inputtext) > 99 || strval(inputtext) < 18)
				{
					SendClientMessage(playerid, COLOR_GREY, "Invalid age specified");
					ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Age", "Enter your age below", "Confirm", "");
				}
				else
				{
					pInfo[playerid][pAge] = strval(inputtext);
					format(string2, sizeof(string2), "Okay we know that you are "EMBED_WHITE"%d"EMBED_YELLOW" years old", pInfo[playerid][pAge]);
					SendClientMessage(playerid, COLOR_YELLOW, string2);
					pInfo[playerid][pTutorial] = 1;
					TogglePlayerSpectating(playerid, false);
					TextDrawShowForPlayer(playerid, textdrawVariables[0]);
				}
        	}
		    else
		    {
		        ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Login", "Enter your age below", "Confirm", "");
			}
		}
        case DIALOG_REGISTER_GENDER:
        {
        	if(response)
        	{
        	    if(listitem == 0)
            	{
                	pInfo[playerid][pGender] = 1;
                	SendClientMessage(playerid, COLOR_YELLOW, "Okay, we now know that you are a male");
                	ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Age", "Enter your age below", "Confirm", "");
            	}
            	if(listitem == 1)
            	{
                	pInfo[playerid][pGender] = 2;
                	SendClientMessage(playerid, COLOR_YELLOW, "Okay, we now know that you are a female");
                	ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Login", "Enter your age below", "Confirm", "");
				}
        	}
        	else
        	{
        	    ShowPlayerDialog(playerid, DIALOG_REGISTER_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Choose", "");
        	}
        }
		case DIALOG_CREDITS1:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Scripting
            {
                ShowPlayerDialog(playerid, DIALOG_CREDITS2, DIALOG_STYLE_LIST, "Scripting Credits", "ikbenremco - Basic Script found on SA-MP Forums\nGhost556 (Khyle_Thomas) - Editing the script", "Okay", "Cancel");
            }
	    	if(listitem == 1) // Mapping
            {
				ShowPlayerDialog(playerid, DIALOG_CREDITS3, DIALOG_STYLE_LIST, "Mapping Credits", "eMapper - School Interior\nWennicke - Hospital Interior\nStefand - All Saints General Hospital Car Park\nDopekill - Bank Exterior", "Okay", "Cancel");
            }

		}
		case DIALOG_JOBL1:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Avalible Jobs
            {
                ShowPlayerDialog(playerid, DIALOG_JOBL2, DIALOG_STYLE_LIST, "Avalible Jobs", "Bus Driver\nTaxi Driver\nMechanic", "Okay", "Cancel");
            }
	    	if(listitem == 1) // Unavalible Jobs
            {
				ShowPlayerDialog(playerid, DIALOG_JOBL3, DIALOG_STYLE_LIST, "Unavalible Jobs", "Pilot\nTrucker\nFisherman", "Okay", "Cancel");
            }

		}
		case DIALOG_JOBL2:
		{
	 		if(!response) return 1;

            if(listitem == 0) // Bus Driver
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS1, DIALOG_STYLE_MSGBOX, "Bus Driver Job", "Bus Driver job - Unity Station\nAvalible vehicles - Bus, Coach\nJob Type - Checkpoints (Routes)", "Join", "Cancel");
            }
	    	if(listitem == 1) // Taxi Driver
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS2, DIALOG_STYLE_MSGBOX, "Taxi Driver Job", "Taxi Driver job - Unity Station\nAvalible vehicles - Taxi, Cabbie\nJob Type - Player interaction (Phonecalls)", "Join", "Cancel");
            }
            if(listitem == 2) // Mechanic
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS3, DIALOG_STYLE_MSGBOX, "Mechanic Job", "Mechanic job - Unconfirmed\nAvalible vehicles - Utility truck, Utility trailer, Towtruck\nJob Type - Player interaction (Phonecalls)", "Join", "Cancel");
            }
		}
		case DIALOG_JOBS1:
		{
    		if(response)
		{
                pInfo[playerid][pJob] = 1;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
				format(string2, sizeof(string2), "[Los Santos Bus Company] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 1774.5931,-1893.5642,13.3854, 2.0);
			}
		}
		case DIALOG_JOBS2:
		{
    		if(response)
		{
                pInfo[playerid][pJob] = 2;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
				format(string2, sizeof(string2), "[Los Santos Taxi Service] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
				SetPlayerCheckpoint(playerid, 1743.3228, -1863.0804, 13.5755, 2.0);
			}            ShowPlayerDialog(playerid, DIALOG_PDD0, DIALOG_STYLE_LIST, "Los Santos Police Department", "Duty\nArmory\nUniform\nHelp", "Join", "Cancel");
		}
		case DIALOG_JOBS3:
		{
    		if(response)
		{
                pInfo[playerid][pJob] = 3;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
  				format(string2, sizeof(string2), "[Los Santos Garage] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
				SetPlayerCheckpoint(playerid, 2330.9863, -2324.5244, 13.3828, 2.0);
			}
		}
		case DIALOG_PDD0:
		{
	    	if(!response) return 1;

            if(listitem == 0) // On Duty
            {
				SetPlayerHealth(playerid, 100);
				SetPlayerArmour(playerid, 100);
                pInfo[playerid][pDuty] = 1;
                SetPlayerColor(playerid, COLOR_BLUE);
                GivePlayerWeapon(playerid, 24, 9999);
                GivePlayerWeapon(playerid, 3, 9999);
                GivePlayerWeapon(playerid, 27, 9999);
                GivePlayerWeapon(playerid, 41, 9999);
            }
	    	else if(listitem == 1) // Armory
            {
				ShowPlayerDialog(playerid, DIALOG_PDD1, DIALOG_STYLE_LIST, "Los Santos Police Department Armory", "Nightstick\nDeagle\nShotgun\nM4\nSniper Rifle\nPepperspray", "Grab", "Cancel");
            }
            else if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_PDD2, DIALOG_STYLE_LIST, "Los Santos Police Department Uniforms", "Probationary Constable\nConstable - Leading Senior Constable\nSergeant - Senior Sergeant\nInspector - Chief Inspector\nSuperintendent - Chief Superintendent\nAssistant Commissioner - Senior Assistant Commissioner\nDeputy Commissioner\nCommissioner\nPublic Order And Riot Squad\nMotorcycle Uniform\nFemale Officer\nOff Duty clothes", "Grab", "Cancel");
			}
		}
		case DIALOG_PDD0A:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Off Duty
            {
                pInfo[playerid][pDuty] = 0;
                SetPlayerColor(playerid, COLOR_WHITE);
            }
	    	else if(listitem == 1) // Armory
            {
				ShowPlayerDialog(playerid, DIALOG_PDD1, DIALOG_STYLE_LIST, "Los Santos Police Department Armory", "Nightstick\nDeagle\nShotgun\nM4\nSniper Rifle\nPepperspray", "Grab", "Cancel");
            }
            else if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_PDD2, DIALOG_STYLE_LIST, "Los Santos Police Department Uniforms", "Probationary Constable\nConstable - Leading Senior Constable\nSergeant - Senior Sergeant\nInspector - Chief Inspector\nSuperintendent - Chief Superintendent\nAssistant Commissioner - Senior Assistant Commissioner\nDeputy Commissioner\nCommissioner\nPublic Order And Riot Squad\nMotorcycle Uniform\nFemale Officer\nOff Duty clothes", "Grab", "Cancel");
			}
  		}
		case DIALOG_PDD1:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Nightstick
            {
                GivePlayerWeapon(playerid, 3, 9999);
            }
	    	else if(listitem == 1) // Deagle
            {
				GivePlayerWeapon(playerid, 24, 9999);
            }
            else if(listitem == 2) // Shotgun
            {
                GivePlayerWeapon(playerid, 27, 9999);
			}
   			else if(listitem == 3) // M4
            {
                GivePlayerWeapon(playerid, 31, 9999);
			}
   			else if(listitem == 4) // Sniper Rifle
            {
                GivePlayerWeapon(playerid, 34, 9999);
			}
			else if(listitem == 5) // Pepperspray
            {
                GivePlayerWeapon(playerid, 41, 9999);
			}
			else if(listitem == 6) // Tear gas
            {
                GivePlayerWeapon(playerid, 17, 9999);
			}
		}
		case DIALOG_PDD2: // LSPD Uniforms
		{
	    	if(!response) return 1;

            if(listitem == 0) // Probationary Constable
            {
                SetPlayerSkin(playerid, 71);
            }
	    	else if(listitem == 1) // Constable - Leading Senior Constable
            {
                
                SetPlayerSkin(playerid, 280);
            }
            else if(listitem == 2) // Sergeant - Senior Sergeant Commissioner\nOff Duty clothes", "Grab", "Cancel");

            {
                
                SetPlayerSkin(playerid, 280);
			}
   			else if(listitem == 3) // Inspector - Chief Inspector
            {
                
                SetPlayerSkin(playerid, 281);
			}
   			else if(listitem == 4) // Superintendent - Chief Superintendent
            {
                
                SetPlayerSkin(playerid, 282);
			}
			else if(listitem == 5) // Assistant Commissioner - Senior Assistant Commissioner
            {
                
                SetPlayerSkin(playerid, 287);
			}
			else if(listitem == 6) // Deputy Commissioner
            {
                
                SetPlayerSkin(playerid, 283);
			}
			else if(listitem == 7) // Commissioner
            {
                
                SetPlayerSkin(playerid, 288);
			}
			else if(listitem == 8) // Public Order And Riot Squad
            {
                
                SetPlayerSkin(playerid, 285);
			}
			else if(listitem == 9) // Bike Patrol
            {
                
                SetPlayerSkin(playerid, 284);
			}
			else if(listitem == 10) // Female Skin
            {
                
                SetPlayerSkin(playerid, 211);
			}
			else if(listitem == 11) // Off duty Skin
            {
                SetPlayerSkin(playerid, pInfo[playerid][pOldSkin]);
			}
		}
		case DIALOG_PDMDC1:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Login
            {
            	ShowPlayerDialog(playerid, DIALOG_PDMDC2, DIALOG_STYLE_LIST, "Los Santos Police Department Home", "Tickets\nWarrants\nLicense plates\nRecent 911 calls\nRequest Assistance\n", "Select", "Quit");
            }
	    	else if(listitem == 1) // Quit
            {
  			}
  		}
  		case DIALOG_PDMDC2:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Tickets
            {
            	ShowPlayerDialog(playerid, DIALOG_PDMDC3, DIALOG_STYLE_LIST, "Los Santos Police Department Tickets", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
	    	else if(listitem == 1) // Warrants
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC4, DIALOG_STYLE_LIST, "Los Santos Police Department Warrants", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
  			}
    		else if(listitem == 2) // License plates
            {
  			}
  			else if(listitem == 3) // Recent 911 calls
            {
				ShowPlayerDialog(playerid, DIALOG_PDMDC6, DIALOG_STYLE_LIST, "Los Santos Police Department 911 Calls", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
  			}
  			else if(listitem == 4) // Request Assistance
            {
				ShowPlayerDialog(playerid, DIALOG_PDMDC7, DIALOG_STYLE_LIST, "Los Santos Police Department Backup", "Patrol Cruisers\nPatrol Helicopters\nPublic Order And Riot Squad\nDetectives\nParamedics\nFire Units", "Select", "Quit");
			}
  		}
  		case DIALOG_PDMDC7:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Patrol Cars
            {
	            new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
				GetPlayerPos(playerid, bkx, bky, bkz);
				format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires additional patrol cruisers at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
				foreach(Player, i)
				SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
	    	else if(listitem == 1) // Patrol Helicopters
            {
	            new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
				GetPlayerPos(playerid, bkx, bky, bkz);
				format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires additional patrol helicopters at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
				foreach(Player, i)
				SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
  			}
    		else if(listitem == 2) // Public Order And Riot Squad
            {
	            new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
				GetPlayerPos(playerid, bkx, bky, bkz);
				format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
				foreach(Player, i)
				SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
			}
  			else if(listitem == 3) // Detectives
            {
	            new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
				GetPlayerPos(playerid, bkx, bky, bkz);
				format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Detective assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
				foreach(Player, i)
				SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
  			}
  			else if(listitem == 4) // Paramedics
            {
            new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
			GetPlayerPos(playerid, bkx, bky, bkz);
			format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
			SendRadioMessage(2, TEAM_PINK_COLOR, string2);
			foreach(Player, i)
			SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
			}
			else if(listitem == 5) // Fire Fighters
            {
	            new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
				GetPlayerPos(playerid, bkx, bky, bkz);
				format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
				SendRadioMessage(3, TEAM_RED_COLOR, string2);
				foreach(Player, i)
				SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
		  		}
		  }
  		case DIALOG_LIC1:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Car License
            {
				ShowPlayerDialog(playerid, DIALOG_LIC2, DIALOG_STYLE_MSGBOX, "Car License", "Car License - Drive legally in Los Santos so you will not be arrested for driving without a license, Fines apply and risk jail time.\nCost - $1500", "Buy", "Cancel");
            }
	    	else if(listitem == 1) // Motorbike License
            {
				ShowPlayerDialog(playerid, DIALOG_LIC3, DIALOG_STYLE_MSGBOX, "Motorbike License", "Motorbike License - Ride legally in Los Santos so you will not be arrested for driving without a license, Fines apply and risk jail time.\nCost - $3500", "Buy", "Cancel");
  			}
    		else if(listitem == 2) // Public Transport License
            {
				ShowPlayerDialog(playerid, DIALOG_LIC4, DIALOG_STYLE_MSGBOX, "Public Transport License", "Public Transport License - Ever wanted to drive a public bus, taxi or train? To get those jobs you are required to have this license\nIf you are found driving a bus, taxi or train without a Public transport license you will be arrested by Law enforcement members.\nCost - $3500", "Buy", "Cancel");
			}
  			else if(listitem == 3) // Trucker License
            {
				ShowPlayerDialog(playerid, DIALOG_LIC5, DIALOG_STYLE_MSGBOX, "Trucker License", "Trucker License - Ever wanted to drive a van or truck? To get those jobs you are required to have this license, If you are found driving a van or truck without a Trucker license you will be arrested by Law enforcement members.\nCost - $3500", "Buy", "Cancel");
  			}
  			else if(listitem == 4) // Pilot License
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Pilot License", "Pilot License - Ever wanted to fly a private jet or plane? To get the pilot job you are required to have this license, If you are found flying a private jet or plane without a Pilot license you will be arrested by Law enforcement members.\nCost - $5500", "Buy", "Cancel");
			}
			else if(listitem == 5) // Weapon License
            {
    			ShowPlayerDialog(playerid, DIALOG_LIC7, DIALOG_STYLE_MSGBOX, "Weapon License", "Weapon License - Ever wanted to buy or own a legal firearm? To buy a firearm from legal establishments you are required to have this license, If you are found holding a firearm without a weapons license you will be arrested by Law enforcement members and your weapons will be taken off of you.\nCost - $11500", "Buy", "Cancel");
  			}
		  }
  		case DIALOG_LIC2:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Buy Car License
            {
				GivePlayerMoney(playerid, -1500);
    			SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Car License and can now drive legally around Los Santos.");
				pInfo[playerid][pDLic] = 1;
			}
			else
			{
				if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pDLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your drivers license for Los Santos.");
			}
  		}
		case DIALOG_LIC3:
			{
	    	if(!response) return 1;

            if(listitem == 0) // Buy Motorbike License
            {
				GivePlayerMoney(playerid, -3500);
    			SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Car License and can now drive legally around Los Santos.");
				pInfo[playerid][pMLic] = 1;
			}
   			else
   			{
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your drivers license for Los Santos.");
				}
			}
  				case DIALOG_LIC4:
			{
	    	if(!response) return 1;

            if(listitem == 0) // Buy Public Transport License
            {
				GivePlayerMoney(playerid, -3500);
    			SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Public Transport License and can now drive and operate busses, taxis and trains legally around Los Santos.");
				pInfo[playerid][pT1Lic] = 1;
			}
			else
			{
				if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your Public Transport License for Los Santos.");
				}
  			}
  				case DIALOG_LIC5:
			{
	    	if(!response) return 1;

            if(listitem == 0) // Buy Trucker License
            {
				GivePlayerMoney(playerid, -3500);
    			SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Trucker License and can now drive and operate vans and trucks, legally around Los Santos.");
				pInfo[playerid][pT2Lic] = 1;
			}
			else
			{
				if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your Public Transport License for Los Santos.");
				}
  			}
  			case DIALOG_ONL1:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Ads
            {
				ShowPlayerDialog(playerid, DIALOG_ONL3, DIALOG_STYLE_LIST, "Advertisment Homepage", "Place an online ad\nPlace an offline ad\nHelp", "Select", "Cancel");
            }
	    	else if(listitem == 1) // Email
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Email Homepage", "Email Someone\nCheck Emails\nHelp", "Buy", "Cancel");
  			}
  			else if(listitem == 2) // Laws
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "Buy", "Cancel");
  			}
  			else if(listitem == 3) // Help
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Help", "General Help", "Select", "Cancel");
			}
			else if(listitem == 4) // Updates
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Updates on the Server", "Current Updates/nUpdates planned in the next update/nUpdate Suggestion", "Select", "Cancel");
			}
		  }
		  case DIALOG_ONL2:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Online Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL3, DIALOG_STYLE_LIST, "Advertisment Homepage", "Place an online ad\nPlace an offline ad\nView recent online ads\nHelp", "Select", "Cancel");
            }
	    	else if(listitem == 1) // Offline Ad
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Email Homepage", "Email Someone\nCheck Emails\nHelp", "Buy", "Cancel");
  			}
  			else if(listitem == 2) // Laws
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "Buy", "Cancel");
  			}
  			else if(listitem == 3) // Help
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Help", "General Help", "Select", "Cancel");
			}
			else if(listitem == 4) // Updates
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Updates on the Server", "Current Updates/nUpdates planned in the next update/nUpdate Suggestion", "Select", "Cancel");
				return 1;
				}
			}/*
			case DIALOG_ONL3:
		{
	    	if(!response) return 1;

            if(listitem == 0) // Online Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL4, DIALOG_STYLE_INPUT, "Online Advertisment", "ad", "Place", "Cancel");
            }
	    	else if(listitem == 1) // Offline Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL5, DIALOG_STYLE_INPUT, "Offline Advertisment", "ad", "Place", "Cancel");
  			}
    		else if(listitem == 2) // Recent Ad
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Recent Online ads", "[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]", "See", "Cancel");
  			}
  			else if(listitem == 2) // Help
            {
				ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "See", "Cancel");
  				}
		  	}*/
  			case DIALOG_ONL3:
			{
	    	if(!response) return 1;

            if(listitem == 0) // Online Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL4, DIALOG_STYLE_LIST, "Online Advertisment", "Advertisment text\nPublisher name\nContact information\nPlace online ad", "Place", "Cancel");
            }
	    	else if(listitem == 1) // Offline Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL5, DIALOG_STYLE_LIST, "Offline Advertisment", "Advertisment text\nPublisher name\nContact information", "Place", "Cancel");
  			}
    		else if(listitem == 2) // Recent Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL6, DIALOG_STYLE_MSGBOX, "Recent Online ads", "[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]", "See", "Cancel");
  			}
  			else if(listitem == 2) // Help
            {
				ShowPlayerDialog(playerid, DIALOG_ONL7, DIALOG_STYLE_MSGBOX, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "See", "Cancel");
  				}
		  	}
		  	case DIALOG_ONL4:
			{
	    	if(!response) return 1;

            if(listitem == 0) // Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL8, DIALOG_STYLE_INPUT, "What do you want the ad to say?", "ad", "Set", "Cancel");
            }
	    	else if(listitem == 1) // Playername
            {
				ShowPlayerDialog(playerid, DIALOG_ONL9, DIALOG_STYLE_INPUT, "What is the publisher's name?", "name", "Set", "Cancel");
  			}
    		else if(listitem == 2) // Contact
            {
				ShowPlayerDialog(playerid, DIALOG_ONL10, DIALOG_STYLE_INPUT, "Contact Information", "cinfo", "Set", "Cancel");
  			}
  			else if(listitem == 2) // Place
            {
				ShowPlayerDialog(playerid, DIALOG_ONL11, DIALOG_STYLE_LIST, "Do you want to place the ad?", "Place\nDon't place", "Place", "Don't place");
  				}
		  	}
		  	case DIALOG_ONL8:
			{
	    	if(!response) return 1;

            if(listitem == 0) // Ad
            {
				ShowPlayerDialog(playerid, DIALOG_ONL8, DIALOG_STYLE_INPUT, "What do you want the ad to say?", "ad", "Set", "Cancel");
            }
	    	else if(listitem == 1) // Playername
            {
				ShowPlayerDialog(playerid, DIALOG_ONL9, DIALOG_STYLE_INPUT, "What is the publisher's name?", "name", "Set", "Cancel");
  			}
    		else if(listitem == 2) // Contact
            {
				ShowPlayerDialog(playerid, DIALOG_ONL10, DIALOG_STYLE_INPUT, "Contact Information", "cinfo", "Set", "Cancel");
  			}
  			else if(listitem == 2) // Place
            {
				ShowPlayerDialog(playerid, DIALOG_ONL11, DIALOG_STYLE_LIST, "Do you want to place the ad?", "Place\nDon't place", "Place", "Don't place");
  				}
		  	}
			case DIALOG_ACC:
			{
			if(!response) return 1;
			
			else if(listitem == 0) 
			{
			    SetPVarString(playerid,"Accent", "American");
   			}
   			else if(listitem == 1) 
   			{
   			    SetPVarString(playerid,"Accent", "Dutch");
			}
			else if(listitem == 2) 
			{
			    SetPVarString(playerid,"Accent","British");
			}
			else if(listitem == 3) 
			{
			    SetPVarString(playerid,"Accent","Italian");
			}
			else if(listitem == 4) 
			{
			    SetPVarString(playerid,"Accent","Dutch");
			}
			else if(listitem == 5) 
			{
			    SetPVarString(playerid,"Accent","French");
			}
			else if(listitem == 6) 
			{
			    SetPVarString(playerid,"Accent","Australian");
			}
			else if(listitem == 7) 
			{
			    SetPVarString(playerid,"Accent","African");
			}
			else if(listitem == 8) 
			{
			    SetPVarString(playerid,"Accent","Chinese");
				}
		  	}
		  	case DIALOG_PDS1:
			{
			if(!response) return 1;

			else if(listitem == 0) // LSPD
			{
			    LSPDV[0] = AddStaticVehicle(596,1593.3845,-1640.0796,13.5499,265.6349,0,1);
   			}
   			else if(listitem == 1) // SFPD
   			{
			    LSPDV[1] = AddStaticVehicle(597,1593.3845,-1640.0796,13.5499,265.6349,0,1);
			}
			else if(listitem == 2) // LVPD
   			{
			    LSPDV[2] = AddStaticVehicle(598,1593.3845,-1640.0796,13.5499,265.6349,0,1);
			}
			else if(listitem == 3) // Enforcer
   			{
			    LSPDV[3] = AddStaticVehicle(427,1593.3845,-1640.0796,13.5499,265.6349,0,1);
			}
			else if(listitem == 4) // Merits
   			{
			    LSPDV[4] = AddStaticVehicle(551,1593.3845,-1640.0796,13.5499,265.6349,0,1);
			}
			else if(listitem == 5) // Cheetahs
   			{
			    LSPDV[5] = AddStaticVehicle(415,1593.3845,-1640.0796,13.5499,265.6349,0,1);
			}
			else if(listitem == 6) // Bike
   			{
			    LSPDV[6] = AddStaticVehicle(523,1593.3845,-1640.0796,13.5499,265.6349,0,1);
			}
			else if(listitem == 7) // Helicopter
   			{
			    LSPDV[7] = AddStaticVehicle(497,1593.3845,-1640.0796,13.5499,265.6349,0,1);
				}
  	 		}
     		case DIALOG_AMENU1:
			{
			if(!response) return 1;

			else if(listitem == 0) // Player Commands
			{
				ShowPlayerDialog(playerid, DIALOG_AMENU2, DIALOG_STYLE_LIST, "Australian Roleplay Server Player Commands", "Set Player Skin\nSet Player Score\nSet Player Cash\nMake Faction Leader", "Command","Exit");
			}
	   		else if(listitem == 1) // Dynamic Lists
   			{
			    ShowPlayerDialog(playerid, DIALOG_AMENU3, DIALOG_STYLE_LIST, "Australian Roleplay Server Dynamic Lists", "Dynamic Houses\nDynamic Apartments\nDynamic Businesses\nDynamic Doors", "Command","Exit");
			}
			else if(listitem == 2) // Misc Commands
   			{
				ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_LIST, "Australian Roleplay Server Misc Commands", "Admin Duty\nWarn Player\nAjail Player\nKick Player\nBan Player/nTeleport Player to Coords/nTeleport Player to You\nTeleport Player to location", "Command","Exit");
			}
		  }
		  	case DIALOG_AMENU2: // Player Commands
			{
			if(!response) return 1;

			else if(listitem == 0) // Set Player Skin
			{
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their skin.","Select","Cancel");
			}
	   		else if(listitem == 1) // Set Player Score
   			{
			    ShowPlayerDialog(playerid, DIALOG_AMENU5, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their score.","Select","Cancel");
			}
			else if(listitem == 2) // Set Player Cash
   			{
			    ShowPlayerDialog(playerid, DIALOG_AMENU1, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their cash.","Select","Cancel");
			}
 		}
  		case DIALOG_AMENU3:
			{
			if(!response) return 1;

			else if(listitem == 0) // Player Commands
			{
				ShowPlayerDialog(playerid, DIALOG_AMENU2, DIALOG_STYLE_LIST, "Australian Roleplay Server Player Commands", "Set Player Skin\nSet Player Score\nSet Player Cash\nMake Faction Leader", "Command","Exit");
			}
	   		else if(listitem == 1) // Dynamic Lists
   			{
			    ShowPlayerDialog(playerid, DIALOG_AMENU3, DIALOG_STYLE_LIST, "Australian Roleplay Server Dynamic Lists", "Dynamic Houses\nDynamic Apartments\nDynamic Businesses\nDynamic Doors", "Command","Exit");
			}
			else if(listitem == 2) // Misc Commands
   			{
				ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_LIST, "Australian Roleplay Server Misc Commands", "Admin Duty\nWarn Player\nAjail Player\nKick Player\nBan Player/nTeleport Player to Coords/nTeleport Player to You\nTeleport Player to location", "Command","Exit");
			}
		  }
		  case DIALOG_AMENU4: // Skin set
	{
		if(response)
		{
			targetID = strval(inputtext);
			if(IsPlayerConnected(targetID))
			{
				ShowPlayerDialog(playerid, DIALOG_AMENU4A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the wanted skin number, you want to give the player.", "Next", "Close");
				return 1;
			}
			else
			{
				SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
				return 1;
			}
		}
		else if(!response)
		{
			SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
			}
		}
  		case DIALOG_AMENU4A: // Skin set 2
	{
			if(response)
        {
            new skinid, message[64];
            skinid = strval(inputtext);
            if(skinid < 0 || skinid > 299)
            {
                SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
            }
            else
            {
                SetPlayerSkin(targetID, skinid);
                format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, skinid);
                SendClientMessage(playerid, 0x33FF33AA, message);
            }
        }
  		case DIALOG_AMENU5: // Score set
	{
		if(response)
		{
			targetID = strval(inputtext);
			if(IsPlayerConnected(targetID))
			{
				ShowPlayerDialog(playerid, DIALOG_AMENU5A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the player id, you want the code to effect.", "Next", "Close");
				return 1;
			}
			else
			{
				SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
				return 1;
			}
		}
		else if(!response)
		{
			SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
		}
	}
  		case DIALOG_AMENU5: // Score set 2
	{
			if(response)
        {
            new score, message[64];
            score = strval(inputtext);
            if(score < 0 || score > 999)
            {
                SendClientMessage(playerid, 0x33FF33AA, "[ARPS] Scores can only be changed between 0 and 999.");
            }
            else
            {
                SetPlayerScore(targetID, score);
                format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, score);
                SendClientMessage(playerid, 0x33FF33AA, message);
            }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#5

There was missing a bracket:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""EMBED_WHITE"Registering",""EMBED_RED"You have entered an invalid password.\n"EMBED_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
               
                new BannedBy[26], BanReason[26];
                format(string2, sizeof(string2), "None");
                strmid(BannedBy, string2, 0, strlen(string2), 255);
               
                format(string2, sizeof(string2), "None");
                strmid(BanReason, string2, 0, strlen(string2), 255);
               
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_SetTag(File,"Offensive Record");
                INI_WriteString(File,"BannedBy",BannedBy);
                INI_WriteString(File,"BanReason",BanReason);
                INI_SetTag(File,"User's statistics");
                INI_WriteInt(File,"Cash",1000);
                INI_WriteInt(File,"Level",1);
                INI_WriteFloat(File,"Health",100);
                INI_Close(File);
                pInfo[playerid][pCash] = 1000;
               
                GivePlayerMoney(playerid, pInfo[playerid][pCash]);
                ShowPlayerDialog(playerid, DIALOG_REGISTER_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Choose", "");
            }
        }
        case DIALOG_HELP:
        {
            if (!response) return 1;
            if(listitem == 0) // General
            {
                ShowPlayerDialog(playerid, DIALOG_HELP_GENERAL, DIALOG_STYLE_MSGBOX, "General Help", "/me /do /\n/credits /jobs /killcp /killcheckpoint", "Ok", "");
            }
            if(listitem == 1) // Chat
            {
                ShowPlayerDialog(playerid, DIALOG_HELP_CHAT, DIALOG_STYLE_MSGBOX, "Chat Help", "/b [local chat]\n /n [server realted questions]\n /o [Text]", "Ok", "");
            }
            if(listitem == 2) // Faction
            {
                if(pInfo[playerid][pMember] == 0)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   You are not in a faction"); return 1;
                }
                if(pInfo[playerid][pLeader] >= 1)
                {
                    if(pInfo[playerid][pMember] == 1)
                    {
                        ShowPlayerDialog(playerid, DIALOG_HELP_FACTION, DIALOG_STYLE_MSGBOX, "LSPD HC", "/radio | /namerank | /giverank | /cuff | /uncuff | /tazer", "Ok", "");
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_BLUE, "   You are not in an active faction");
                    }
                }
                else
                {
                    if(pInfo[playerid][pMember] == 1)
                    {
                        ShowPlayerDialog(playerid, DIALOG_HELP_FACTION, DIALOG_STYLE_MSGBOX, "LEO Commands", "/radio, /tazer, /cuff /uncuff ", "Ok", "");
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_BLUE, "   You are not in an active faction");
                    }
                }
            }
        }
        case DIALOG_DOOR:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
            else
            {
                ShowPlayerDialog(playerid, DIALOG_DOOR2, DIALOG_STYLE_LIST, "Edit door", "Interior\nExterior", "Choose", "Cancel");
            }
        }
        case DIALOG_DOOR_EDIT_NAME:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
           
            new doorid = DoorID[playerid];
           
            Delete3DTextLabel(DoorRefText[doorid]);
           
           
            format(string2, sizeof(string2), "%s", inputtext);
            strmid(dInfo[doorid][dName], string2, 0, strlen(string2), 255);
           
            new doornametext[128];
            format(doornametext, sizeof(doornametext), "%s\n\nType /enter to go inside.", dInfo[doorid][dName]);
           
            Delete3DTextLabel(DoorRefText[doorid]);
            DoorRefText[doorid] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, dInfo[doorid][oPosX], dInfo[doorid][oPosY], dInfo[doorid][oPosZ]+0.75, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, dInfo[doorid][oVW], dInfo[doorid][oInterior]);
           
        }
        case DIALOG_DOOR2:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
           
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_DOOR_EDIT_NAME, DIALOG_STYLE_INPUT, "Edit Door Name", "Please enter the door name below:", "Okay", "Cancel");
            }
            if(listitem == 1) // INterior
            {
                Edittingdoor[playerid] = 1;
                SendClientMessage(playerid, COLOR_GREY, "   Write /ddone to confirm the interior position");
            }
            if(listitem == 2) // Exterior
            {
                Edittingdoor[playerid] = 2;
                SendClientMessage(playerid, COLOR_GREY, "   Write /ddone to confirm the exterior position");
            }
           
        }
        case DIALOG_DOOR_EDIT:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
            else
            {
                if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                new ident = strval(inputtext);
                DoorID[playerid] = ident;
               
                ShowPlayerDialog(playerid, DIALOG_DOOR2, DIALOG_STYLE_LIST, "Edit door", "Door Name\nInterior\nExterior", "Choose", "Cancel");
            }
        }
        case DIALOG_DOOR_ADD:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
            else
            {
                new Float:X, Float:Y, Float:Z, Float:Angle;
                GetPlayerPos(playerid, X, Y, Z);
                if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                new ident = strval(inputtext);
                if(ident > 10 || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                if(ident < 1 || ident > 20) return SendClientMessage(playerid, COLOR_GREY, "   Door id range between [1-20]");
               
                format(string2, sizeof(string2), "%d", dInfo[ident][dTaken]);
                if(strcmp(string2, "0", true) != 0)
                    return SendClientMessage(playerid, COLOR_GRAD1, "That door ID is already in use.");
               
                DoorID[playerid] = ident;
               
                format(string2, sizeof(string2), "None");
                strmid(dInfo[ident][dName], string2, 0, strlen(string2), 255);
               
                dInfo[ident][oPosX] = X;
                dInfo[ident][oPosY] = Y;
                dInfo[ident][dTaken] = 1;
                dInfo[ident][oPosA] = GetPlayerFacingAngle(playerid, Angle);
                dInfo[ident][oPosZ] = Z;
                dInfo[ident][oVW] = GetPlayerVirtualWorld(playerid);
                dInfo[ident][oInterior] = GetPlayerInterior(playerid);
                dInfo[ident][iVW] = ident;
               
                new doornametext[128];
                format(doornametext, sizeof(doornametext), "Type /enter to go inside.");
                DoorRefText[ident] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, dInfo[ident][oPosX], dInfo[ident][oPosY], dInfo[ident][oPosZ]+0.75, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, dInfo[ident][oVW], dInfo[ident][oInterior]);
               
                DoorRef[ident] = CreateDynamicPickup(1239, 23, dInfo[ident][oPosX], dInfo[ident][oPosY], dInfo[ident][oPosZ], dInfo[ident][oVW]);
               
                SaveDoors();
               
            }
        }
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == pInfo[playerid][pPass])
                {
                    GivePlayerMoney(playerid, pInfo[playerid][pCash]);
                    TogglePlayerSpectating(playerid, false);
                    gPlayerLogged[playerid] = 1;
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""EMBED_WHITE"Login",""EMBED_RED"You have entered an incorrect password.\n"EMBED_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
        case DIALOG_REGISTER_AGE:
        {
            if(response)
            {
                if(strval(inputtext) > 99 || strval(inputtext) < 18)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Invalid age specified");
                    ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Age", "Enter your age below", "Confirm", "");
                }
                else
                {
                    pInfo[playerid][pAge] = strval(inputtext);
                    format(string2, sizeof(string2), "Okay we know that you are "EMBED_WHITE"%d"EMBED_YELLOW" years old", pInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_YELLOW, string2);
                    pInfo[playerid][pTutorial] = 1;
                    TogglePlayerSpectating(playerid, false);
                    TextDrawShowForPlayer(playerid, textdrawVariables[0]);
                }
            }
            else
            {
                ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Login", "Enter your age below", "Confirm", "");
            }
        }
        case DIALOG_REGISTER_GENDER:
        {
            if(response)
            {
                if(listitem == 0)
                {
                    pInfo[playerid][pGender] = 1;
                    SendClientMessage(playerid, COLOR_YELLOW, "Okay, we now know that you are a male");
                    ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Age", "Enter your age below", "Confirm", "");
                }
                if(listitem == 1)
                {
                    pInfo[playerid][pGender] = 2;
                    SendClientMessage(playerid, COLOR_YELLOW, "Okay, we now know that you are a female");
                    ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Login", "Enter your age below", "Confirm", "");
                }
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_REGISTER_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Choose", "");
            }
        }
        case DIALOG_CREDITS1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Scripting
            {
                ShowPlayerDialog(playerid, DIALOG_CREDITS2, DIALOG_STYLE_LIST, "Scripting Credits", "ikbenremco - Basic Script found on SA-MP Forums\nGhost556 (Khyle_Thomas) - Editing the script", "Okay", "Cancel");
            }
            if(listitem == 1) // Mapping
            {
                ShowPlayerDialog(playerid, DIALOG_CREDITS3, DIALOG_STYLE_LIST, "Mapping Credits", "eMapper - School Interior\nWennicke - Hospital Interior\nStefand - All Saints General Hospital Car Park\nDopekill - Bank Exterior", "Okay", "Cancel");
            }
           
        }
        case DIALOG_JOBL1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Avalible Jobs
            {
                ShowPlayerDialog(playerid, DIALOG_JOBL2, DIALOG_STYLE_LIST, "Avalible Jobs", "Bus Driver\nTaxi Driver\nMechanic", "Okay", "Cancel");
            }
            if(listitem == 1) // Unavalible Jobs
            {
                ShowPlayerDialog(playerid, DIALOG_JOBL3, DIALOG_STYLE_LIST, "Unavalible Jobs", "Pilot\nTrucker\nFisherman", "Okay", "Cancel");
            }
           
        }
        case DIALOG_JOBL2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Bus Driver
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS1, DIALOG_STYLE_MSGBOX, "Bus Driver Job", "Bus Driver job - Unity Station\nAvalible vehicles - Bus, Coach\nJob Type - Checkpoints (Routes)", "Join", "Cancel");
            }
            if(listitem == 1) // Taxi Driver
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS2, DIALOG_STYLE_MSGBOX, "Taxi Driver Job", "Taxi Driver job - Unity Station\nAvalible vehicles - Taxi, Cabbie\nJob Type - Player interaction (Phonecalls)", "Join", "Cancel");
            }
            if(listitem == 2) // Mechanic
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS3, DIALOG_STYLE_MSGBOX, "Mechanic Job", "Mechanic job - Unconfirmed\nAvalible vehicles - Utility truck, Utility trailer, Towtruck\nJob Type - Player interaction (Phonecalls)", "Join", "Cancel");
            }
        }
        case DIALOG_JOBS1:
        {
            if(response)
            {
                pInfo[playerid][pJob] = 1;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
                format(string2, sizeof(string2), "[Los Santos Bus Company] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 1774.5931,-1893.5642,13.3854, 2.0);
            }
        }
        case DIALOG_JOBS2:
        {
            if(response)
            {
                pInfo[playerid][pJob] = 2;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
                format(string2, sizeof(string2), "[Los Santos Taxi Service] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 1743.3228, -1863.0804, 13.5755, 2.0);
            }            ShowPlayerDialog(playerid, DIALOG_PDD0, DIALOG_STYLE_LIST, "Los Santos Police Department", "Duty\nArmory\nUniform\nHelp", "Join", "Cancel");
        }
        case DIALOG_JOBS3:
        {
            if(response)
            {
                pInfo[playerid][pJob] = 3;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
                format(string2, sizeof(string2), "[Los Santos Garage] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 2330.9863, -2324.5244, 13.3828, 2.0);
            }
        }
        case DIALOG_PDD0:
        {
            if(!response) return 1;
           
            if(listitem == 0) // On Duty
            {
                SetPlayerHealth(playerid, 100);
                SetPlayerArmour(playerid, 100);
                pInfo[playerid][pDuty] = 1;
                SetPlayerColor(playerid, COLOR_BLUE);
                GivePlayerWeapon(playerid, 24, 9999);
                GivePlayerWeapon(playerid, 3, 9999);
                GivePlayerWeapon(playerid, 27, 9999);
                GivePlayerWeapon(playerid, 41, 9999);
            }
            else if(listitem == 1) // Armory
            {
                ShowPlayerDialog(playerid, DIALOG_PDD1, DIALOG_STYLE_LIST, "Los Santos Police Department Armory", "Nightstick\nDeagle\nShotgun\nM4\nSniper Rifle\nPepperspray", "Grab", "Cancel");
            }
            else if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_PDD2, DIALOG_STYLE_LIST, "Los Santos Police Department Uniforms", "Probationary Constable\nConstable - Leading Senior Constable\nSergeant - Senior Sergeant\nInspector - Chief Inspector\nSuperintendent - Chief Superintendent\nAssistant Commissioner - Senior Assistant Commissioner\nDeputy Commissioner\nCommissioner\nPublic Order And Riot Squad\nMotorcycle Uniform\nFemale Officer\nOff Duty clothes", "Grab", "Cancel");
            }
        }
        case DIALOG_PDD0A:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Off Duty
            {
                pInfo[playerid][pDuty] = 0;
                SetPlayerColor(playerid, COLOR_WHITE);
            }
            else if(listitem == 1) // Armory
            {
                ShowPlayerDialog(playerid, DIALOG_PDD1, DIALOG_STYLE_LIST, "Los Santos Police Department Armory", "Nightstick\nDeagle\nShotgun\nM4\nSniper Rifle\nPepperspray", "Grab", "Cancel");
            }
            else if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_PDD2, DIALOG_STYLE_LIST, "Los Santos Police Department Uniforms", "Probationary Constable\nConstable - Leading Senior Constable\nSergeant - Senior Sergeant\nInspector - Chief Inspector\nSuperintendent - Chief Superintendent\nAssistant Commissioner - Senior Assistant Commissioner\nDeputy Commissioner\nCommissioner\nPublic Order And Riot Squad\nMotorcycle Uniform\nFemale Officer\nOff Duty clothes", "Grab", "Cancel");
            }
        }
        case DIALOG_PDD1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Nightstick
            {
                GivePlayerWeapon(playerid, 3, 9999);
            }
            else if(listitem == 1) // Deagle
            {
                GivePlayerWeapon(playerid, 24, 9999);
            }
            else if(listitem == 2) // Shotgun
            {
                GivePlayerWeapon(playerid, 27, 9999);
            }
            else if(listitem == 3) // M4
            {
                GivePlayerWeapon(playerid, 31, 9999);
            }
            else if(listitem == 4) // Sniper Rifle
            {
                GivePlayerWeapon(playerid, 34, 9999);
            }
            else if(listitem == 5) // Pepperspray
            {
                GivePlayerWeapon(playerid, 41, 9999);
            }
            else if(listitem == 6) // Tear gas
            {
                GivePlayerWeapon(playerid, 17, 9999);
            }
        }
        case DIALOG_PDD2: // LSPD Uniforms
        {
            if(!response) return 1;
           
            if(listitem == 0) // Probationary Constable
            {
                SetPlayerSkin(playerid, 71);
            }
            else if(listitem == 1) // Constable - Leading Senior Constable
            {
               
                SetPlayerSkin(playerid, 280);
            }
            else if(listitem == 2) // Sergeant - Senior Sergeant Commissioner\nOff Duty clothes", "Grab", "Cancel");
           
            {
               
                SetPlayerSkin(playerid, 280);
            }
            else if(listitem == 3) // Inspector - Chief Inspector
            {
               
                SetPlayerSkin(playerid, 281);
            }
            else if(listitem == 4) // Superintendent - Chief Superintendent
            {
               
                SetPlayerSkin(playerid, 282);
            }
            else if(listitem == 5) // Assistant Commissioner - Senior Assistant Commissioner
            {
               
                SetPlayerSkin(playerid, 287);
            }
            else if(listitem == 6) // Deputy Commissioner
            {
               
                SetPlayerSkin(playerid, 283);
            }
            else if(listitem == 7) // Commissioner
            {
               
                SetPlayerSkin(playerid, 288);
            }
            else if(listitem == 8) // Public Order And Riot Squad
            {
               
                SetPlayerSkin(playerid, 285);
            }
            else if(listitem == 9) // Bike Patrol
            {
               
                SetPlayerSkin(playerid, 284);
            }
            else if(listitem == 10) // Female Skin
            {
               
                SetPlayerSkin(playerid, 211);
            }
            else if(listitem == 11) // Off duty Skin
            {
                SetPlayerSkin(playerid, pInfo[playerid][pOldSkin]);
            }
        }
        case DIALOG_PDMDC1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Login
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC2, DIALOG_STYLE_LIST, "Los Santos Police Department Home", "Tickets\nWarrants\nLicense plates\nRecent 911 calls\nRequest Assistance\n", "Select", "Quit");
            }
            else if(listitem == 1) // Quit
            {
            }
        }
        case DIALOG_PDMDC2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Tickets
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC3, DIALOG_STYLE_LIST, "Los Santos Police Department Tickets", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
            else if(listitem == 1) // Warrants
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC4, DIALOG_STYLE_LIST, "Los Santos Police Department Warrants", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
            else if(listitem == 2) // License plates
            {
            }
            else if(listitem == 3) // Recent 911 calls
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC6, DIALOG_STYLE_LIST, "Los Santos Police Department 911 Calls", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
            else if(listitem == 4) // Request Assistance
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC7, DIALOG_STYLE_LIST, "Los Santos Police Department Backup", "Patrol Cruisers\nPatrol Helicopters\nPublic Order And Riot Squad\nDetectives\nParamedics\nFire Units", "Select", "Quit");
            }
        }
        case DIALOG_PDMDC7:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Patrol Cars
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires additional patrol cruisers at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 1) // Patrol Helicopters
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires additional patrol helicopters at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 2) // Public Order And Riot Squad
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 3) // Detectives
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Detective assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 4) // Paramedics
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(2, TEAM_PINK_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 5) // Fire Fighters
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(3, TEAM_RED_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
        }
        case DIALOG_LIC1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Car License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC2, DIALOG_STYLE_MSGBOX, "Car License", "Car License - Drive legally in Los Santos so you will not be arrested for driving without a license, Fines apply and risk jail time.\nCost - $1500", "Buy", "Cancel");
            }
            else if(listitem == 1) // Motorbike License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC3, DIALOG_STYLE_MSGBOX, "Motorbike License", "Motorbike License - Ride legally in Los Santos so you will not be arrested for driving without a license, Fines apply and risk jail time.\nCost - $3500", "Buy", "Cancel");
            }
            else if(listitem == 2) // Public Transport License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC4, DIALOG_STYLE_MSGBOX, "Public Transport License", "Public Transport License - Ever wanted to drive a public bus, taxi or train? To get those jobs you are required to have this license\nIf you are found driving a bus, taxi or train without a Public transport license you will be arrested by Law enforcement members.\nCost - $3500", "Buy", "Cancel");
            }
            else if(listitem == 3) // Trucker License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC5, DIALOG_STYLE_MSGBOX, "Trucker License", "Trucker License - Ever wanted to drive a van or truck? To get those jobs you are required to have this license, If you are found driving a van or truck without a Trucker license you will be arrested by Law enforcement members.\nCost - $3500", "Buy", "Cancel");
            }
            else if(listitem == 4) // Pilot License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Pilot License", "Pilot License - Ever wanted to fly a private jet or plane? To get the pilot job you are required to have this license, If you are found flying a private jet or plane without a Pilot license you will be arrested by Law enforcement members.\nCost - $5500", "Buy", "Cancel");
            }
            else if(listitem == 5) // Weapon License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC7, DIALOG_STYLE_MSGBOX, "Weapon License", "Weapon License - Ever wanted to buy or own a legal firearm? To buy a firearm from legal establishments you are required to have this license, If you are found holding a firearm without a weapons license you will be arrested by Law enforcement members and your weapons will be taken off of you.\nCost - $11500", "Buy", "Cancel");
            }
        }
        case DIALOG_LIC2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Car License
            {
                GivePlayerMoney(playerid, -1500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Car License and can now drive legally around Los Santos.");
                pInfo[playerid][pDLic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pDLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your drivers license for Los Santos.");
            }
        }
        case DIALOG_LIC3:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Motorbike License
            {
                GivePlayerMoney(playerid, -3500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Car License and can now drive legally around Los Santos.");
                pInfo[playerid][pMLic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your drivers license for Los Santos.");
            }
        }
        case DIALOG_LIC4:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Public Transport License
            {
                GivePlayerMoney(playerid, -3500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Public Transport License and can now drive and operate busses, taxis and trains legally around Los Santos.");
                pInfo[playerid][pT1Lic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your Public Transport License for Los Santos.");
            }
        }
        case DIALOG_LIC5:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Trucker License
            {
                GivePlayerMoney(playerid, -3500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Trucker License and can now drive and operate vans and trucks, legally around Los Santos.");
                pInfo[playerid][pT2Lic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your Public Transport License for Los Santos.");
            }
        }
        case DIALOG_ONL1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Ads
            {
                ShowPlayerDialog(playerid, DIALOG_ONL3, DIALOG_STYLE_LIST, "Advertisment Homepage", "Place an online ad\nPlace an offline ad\nHelp", "Select", "Cancel");
            }
            else if(listitem == 1) // Email
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Email Homepage", "Email Someone\nCheck Emails\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 2) // Laws
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 3) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Help", "General Help", "Select", "Cancel");
            }
            else if(listitem == 4) // Updates
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Updates on the Server", "Current Updates/nUpdates planned in the next update/nUpdate Suggestion", "Select", "Cancel");
            }
        }
        case DIALOG_ONL2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Online Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL3, DIALOG_STYLE_LIST, "Advertisment Homepage", "Place an online ad\nPlace an offline ad\nView recent online ads\nHelp", "Select", "Cancel");
            }
            else if(listitem == 1) // Offline Ad
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Email Homepage", "Email Someone\nCheck Emails\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 2) // Laws
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 3) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Help", "General Help", "Select", "Cancel");
            }
            else if(listitem == 4) // Updates
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Updates on the Server", "Current Updates/nUpdates planned in the next update/nUpdate Suggestion", "Select", "Cancel");
                return 1;
            }
        }/*
        case DIALOG_ONL3:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Online Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL4, DIALOG_STYLE_INPUT, "Online Advertisment", "ad", "Place", "Cancel");
            }
            else if(listitem == 1) // Offline Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL5, DIALOG_STYLE_INPUT, "Offline Advertisment", "ad", "Place", "Cancel");
            }
            else if(listitem == 2) // Recent Ad
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Recent Online ads", "[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]", "See", "Cancel");
            }
            else if(listitem == 2) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "See", "Cancel");
            }
        }*/

        case DIALOG_ONL3:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Online Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL4, DIALOG_STYLE_LIST, "Online Advertisment", "Advertisment text\nPublisher name\nContact information\nPlace online ad", "Place", "Cancel");
            }
            else if(listitem == 1) // Offline Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL5, DIALOG_STYLE_LIST, "Offline Advertisment", "Advertisment text\nPublisher name\nContact information", "Place", "Cancel");
            }
            else if(listitem == 2) // Recent Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL6, DIALOG_STYLE_MSGBOX, "Recent Online ads", "[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]", "See", "Cancel");
            }
            else if(listitem == 2) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_ONL7, DIALOG_STYLE_MSGBOX, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "See", "Cancel");
            }
        }
        case DIALOG_ONL4:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL8, DIALOG_STYLE_INPUT, "What do you want the ad to say?", "ad", "Set", "Cancel");
            }
            else if(listitem == 1) // Playername
            {
                ShowPlayerDialog(playerid, DIALOG_ONL9, DIALOG_STYLE_INPUT, "What is the publisher's name?", "name", "Set", "Cancel");
            }
            else if(listitem == 2) // Contact
            {
                ShowPlayerDialog(playerid, DIALOG_ONL10, DIALOG_STYLE_INPUT, "Contact Information", "cinfo", "Set", "Cancel");
            }
            else if(listitem == 2) // Place
            {
                ShowPlayerDialog(playerid, DIALOG_ONL11, DIALOG_STYLE_LIST, "Do you want to place the ad?", "Place\nDon't place", "Place", "Don't place");
            }
        }
        case DIALOG_ONL8:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL8, DIALOG_STYLE_INPUT, "What do you want the ad to say?", "ad", "Set", "Cancel");
            }
            else if(listitem == 1) // Playername
            {
                ShowPlayerDialog(playerid, DIALOG_ONL9, DIALOG_STYLE_INPUT, "What is the publisher's name?", "name", "Set", "Cancel");
            }
            else if(listitem == 2) // Contact
            {
                ShowPlayerDialog(playerid, DIALOG_ONL10, DIALOG_STYLE_INPUT, "Contact Information", "cinfo", "Set", "Cancel");
            }
            else if(listitem == 2) // Place
            {
                ShowPlayerDialog(playerid, DIALOG_ONL11, DIALOG_STYLE_LIST, "Do you want to place the ad?", "Place\nDon't place", "Place", "Don't place");
            }
        }
        case DIALOG_ACC:
        {
            if(!response) return 1;
           
            else if(listitem == 0)
            {
                SetPVarString(playerid,"Accent", "American");
            }
            else if(listitem == 1)
            {
                SetPVarString(playerid,"Accent", "Dutch");
            }
            else if(listitem == 2)
            {
                SetPVarString(playerid,"Accent","British");
            }
            else if(listitem == 3)
            {
                SetPVarString(playerid,"Accent","Italian");
            }
            else if(listitem == 4)
            {
                SetPVarString(playerid,"Accent","Dutch");
            }
            else if(listitem == 5)
            {
                SetPVarString(playerid,"Accent","French");
            }
            else if(listitem == 6)
            {
                SetPVarString(playerid,"Accent","Australian");
            }
            else if(listitem == 7)
            {
                SetPVarString(playerid,"Accent","African");
            }
            else if(listitem == 8)
            {
                SetPVarString(playerid,"Accent","Chinese");
            }
        }
        case DIALOG_PDS1:
        {
            if(!response) return 1;
           
            else if(listitem == 0) // LSPD
            {
                LSPDV[0] = AddStaticVehicle(596,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 1) // SFPD
            {
                LSPDV[1] = AddStaticVehicle(597,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 2) // LVPD
            {
                LSPDV[2] = AddStaticVehicle(598,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 3) // Enforcer
            {
                LSPDV[3] = AddStaticVehicle(427,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 4) // Merits
            {
                LSPDV[4] = AddStaticVehicle(551,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 5) // Cheetahs
            {
                LSPDV[5] = AddStaticVehicle(415,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 6) // Bike
            {
                LSPDV[6] = AddStaticVehicle(523,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 7) // Helicopter
            {
                LSPDV[7] = AddStaticVehicle(497,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
        }
        case DIALOG_AMENU1:
        {
            if(!response) return 1;
           
            else if(listitem == 0) // Player Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU2, DIALOG_STYLE_LIST, "Australian Roleplay Server Player Commands", "Set Player Skin\nSet Player Score\nSet Player Cash\nMake Faction Leader", "Command","Exit");
            }
            else if(listitem == 1) // Dynamic Lists
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU3, DIALOG_STYLE_LIST, "Australian Roleplay Server Dynamic Lists", "Dynamic Houses\nDynamic Apartments\nDynamic Businesses\nDynamic Doors", "Command","Exit");
            }
            else if(listitem == 2) // Misc Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_LIST, "Australian Roleplay Server Misc Commands", "Admin Duty\nWarn Player\nAjail Player\nKick Player\nBan Player/nTeleport Player to Coords/nTeleport Player to You\nTeleport Player to location", "Command","Exit");
            }
        }
        case DIALOG_AMENU2: // Player Commands
        {
            if(!response) return 1;
           
            else if(listitem == 0) // Set Player Skin
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their skin.","Select","Cancel");
            }
            else if(listitem == 1) // Set Player Score
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU5, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their score.","Select","Cancel");
            }
            else if(listitem == 2) // Set Player Cash
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU1, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their cash.","Select","Cancel");
            }
        }
        case DIALOG_AMENU3:
        {
            if(!response) return 1;
           
            else if(listitem == 0) // Player Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU2, DIALOG_STYLE_LIST, "Australian Roleplay Server Player Commands", "Set Player Skin\nSet Player Score\nSet Player Cash\nMake Faction Leader", "Command","Exit");
            }
            else if(listitem == 1) // Dynamic Lists
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU3, DIALOG_STYLE_LIST, "Australian Roleplay Server Dynamic Lists", "Dynamic Houses\nDynamic Apartments\nDynamic Businesses\nDynamic Doors", "Command","Exit");
            }
            else if(listitem == 2) // Misc Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_LIST, "Australian Roleplay Server Misc Commands", "Admin Duty\nWarn Player\nAjail Player\nKick Player\nBan Player/nTeleport Player to Coords/nTeleport Player to You\nTeleport Player to location", "Command","Exit");
            }
        }
        case DIALOG_AMENU4: // Skin set
        {
            if(response)
            {
                targetID = strval(inputtext);
                if(IsPlayerConnected(targetID))
                {
                    ShowPlayerDialog(playerid, DIALOG_AMENU4A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the wanted skin number, you want to give the player.", "Next", "Close");
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
                    return 1;
                }
            }
            else if(!response)
            {
                SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
            }
        }
        case DIALOG_AMENU4A: // Skin set 2
        {
            if(response)
            {
                new skinid, message[64];
                skinid = strval(inputtext);
                if(skinid < 0 || skinid > 299)
                {
                    SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
                }
                else
                {
                    SetPlayerSkin(targetID, skinid);
                    format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, skinid);
                    SendClientMessage(playerid, 0x33FF33AA, message);
                }
            }
        }
        case DIALOG_AMENU5: // Score set
        {
            if(response)
            {
                targetID = strval(inputtext);
                if(IsPlayerConnected(targetID))
                {
                    ShowPlayerDialog(playerid, DIALOG_AMENU5A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the player id, you want the code to effect.", "Next", "Close");
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
                    return 1;
                }
            }
            else if(!response)
            {
                SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
            }
        }
        case DIALOG_AMENU5: // Score set 2
        {
            if(response)
            {
                new score, message[64];
                score = strval(inputtext);
                if(score < 0 || score > 999)
                {
                    SendClientMessage(playerid, 0x33FF33AA, "[ARPS] Scores can only be changed between 0 and 999.");
                }
                else
                {
                    SetPlayerScore(targetID, score);
                    format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, score);
                    SendClientMessage(playerid, 0x33FF33AA, message);
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
There was missing a bracket:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""EMBED_WHITE"Registering",""EMBED_RED"You have entered an invalid password.\n"EMBED_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
               
                new BannedBy[26], BanReason[26];
                format(string2, sizeof(string2), "None");
                strmid(BannedBy, string2, 0, strlen(string2), 255);
               
                format(string2, sizeof(string2), "None");
                strmid(BanReason, string2, 0, strlen(string2), 255);
               
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_SetTag(File,"Offensive Record");
                INI_WriteString(File,"BannedBy",BannedBy);
                INI_WriteString(File,"BanReason",BanReason);
                INI_SetTag(File,"User's statistics");
                INI_WriteInt(File,"Cash",1000);
                INI_WriteInt(File,"Level",1);
                INI_WriteFloat(File,"Health",100);
                INI_Close(File);
                pInfo[playerid][pCash] = 1000;
               
                GivePlayerMoney(playerid, pInfo[playerid][pCash]);
                ShowPlayerDialog(playerid, DIALOG_REGISTER_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Choose", "");
            }
        }
        case DIALOG_HELP:
        {
            if (!response) return 1;
            if(listitem == 0) // General
            {
                ShowPlayerDialog(playerid, DIALOG_HELP_GENERAL, DIALOG_STYLE_MSGBOX, "General Help", "/me /do /\n/credits /jobs /killcp /killcheckpoint", "Ok", "");
            }
            if(listitem == 1) // Chat
            {
                ShowPlayerDialog(playerid, DIALOG_HELP_CHAT, DIALOG_STYLE_MSGBOX, "Chat Help", "/b [local chat]\n /n [server realted questions]\n /o [Text]", "Ok", "");
            }
            if(listitem == 2) // Faction
            {
                if(pInfo[playerid][pMember] == 0)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   You are not in a faction"); return 1;
                }
                if(pInfo[playerid][pLeader] >= 1)
                {
                    if(pInfo[playerid][pMember] == 1)
                    {
                        ShowPlayerDialog(playerid, DIALOG_HELP_FACTION, DIALOG_STYLE_MSGBOX, "LSPD HC", "/radio | /namerank | /giverank | /cuff | /uncuff | /tazer", "Ok", "");
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_BLUE, "   You are not in an active faction");
                    }
                }
                else
                {
                    if(pInfo[playerid][pMember] == 1)
                    {
                        ShowPlayerDialog(playerid, DIALOG_HELP_FACTION, DIALOG_STYLE_MSGBOX, "LEO Commands", "/radio, /tazer, /cuff /uncuff ", "Ok", "");
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_BLUE, "   You are not in an active faction");
                    }
                }
            }
        }
        case DIALOG_DOOR:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
            else
            {
                ShowPlayerDialog(playerid, DIALOG_DOOR2, DIALOG_STYLE_LIST, "Edit door", "Interior\nExterior", "Choose", "Cancel");
            }
        }
        case DIALOG_DOOR_EDIT_NAME:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
           
            new doorid = DoorID[playerid];
           
            Delete3DTextLabel(DoorRefText[doorid]);
           
           
            format(string2, sizeof(string2), "%s", inputtext);
            strmid(dInfo[doorid][dName], string2, 0, strlen(string2), 255);
           
            new doornametext[128];
            format(doornametext, sizeof(doornametext), "%s\n\nType /enter to go inside.", dInfo[doorid][dName]);
           
            Delete3DTextLabel(DoorRefText[doorid]);
            DoorRefText[doorid] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, dInfo[doorid][oPosX], dInfo[doorid][oPosY], dInfo[doorid][oPosZ]+0.75, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, dInfo[doorid][oVW], dInfo[doorid][oInterior]);
           
        }
        case DIALOG_DOOR2:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
           
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_DOOR_EDIT_NAME, DIALOG_STYLE_INPUT, "Edit Door Name", "Please enter the door name below:", "Okay", "Cancel");
            }
            if(listitem == 1) // INterior
            {
                Edittingdoor[playerid] = 1;
                SendClientMessage(playerid, COLOR_GREY, "   Write /ddone to confirm the interior position");
            }
            if(listitem == 2) // Exterior
            {
                Edittingdoor[playerid] = 2;
                SendClientMessage(playerid, COLOR_GREY, "   Write /ddone to confirm the exterior position");
            }
           
        }
        case DIALOG_DOOR_EDIT:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
            else
            {
                if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                new ident = strval(inputtext);
                DoorID[playerid] = ident;
               
                ShowPlayerDialog(playerid, DIALOG_DOOR2, DIALOG_STYLE_LIST, "Edit door", "Door Name\nInterior\nExterior", "Choose", "Cancel");
            }
        }
        case DIALOG_DOOR_ADD:
        {
            if(pInfo[playerid][pAdmin] <= 1337) return SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this.");
            if(!response) return 1;
            else
            {
                new Float:X, Float:Y, Float:Z, Float:Angle;
                GetPlayerPos(playerid, X, Y, Z);
                if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                new ident = strval(inputtext);
                if(ident > 10 || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID!");
               
                if(ident < 1 || ident > 20) return SendClientMessage(playerid, COLOR_GREY, "   Door id range between [1-20]");
               
                format(string2, sizeof(string2), "%d", dInfo[ident][dTaken]);
                if(strcmp(string2, "0", true) != 0)
                    return SendClientMessage(playerid, COLOR_GRAD1, "That door ID is already in use.");
               
                DoorID[playerid] = ident;
               
                format(string2, sizeof(string2), "None");
                strmid(dInfo[ident][dName], string2, 0, strlen(string2), 255);
               
                dInfo[ident][oPosX] = X;
                dInfo[ident][oPosY] = Y;
                dInfo[ident][dTaken] = 1;
                dInfo[ident][oPosA] = GetPlayerFacingAngle(playerid, Angle);
                dInfo[ident][oPosZ] = Z;
                dInfo[ident][oVW] = GetPlayerVirtualWorld(playerid);
                dInfo[ident][oInterior] = GetPlayerInterior(playerid);
                dInfo[ident][iVW] = ident;
               
                new doornametext[128];
                format(doornametext, sizeof(doornametext), "Type /enter to go inside.");
                DoorRefText[ident] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, dInfo[ident][oPosX], dInfo[ident][oPosY], dInfo[ident][oPosZ]+0.75, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, dInfo[ident][oVW], dInfo[ident][oInterior]);
               
                DoorRef[ident] = CreateDynamicPickup(1239, 23, dInfo[ident][oPosX], dInfo[ident][oPosY], dInfo[ident][oPosZ], dInfo[ident][oVW]);
               
                SaveDoors();
               
            }
        }
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == pInfo[playerid][pPass])
                {
                    GivePlayerMoney(playerid, pInfo[playerid][pCash]);
                    TogglePlayerSpectating(playerid, false);
                    gPlayerLogged[playerid] = 1;
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""EMBED_WHITE"Login",""EMBED_RED"You have entered an incorrect password.\n"EMBED_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
        case DIALOG_REGISTER_AGE:
        {
            if(response)
            {
                if(strval(inputtext) > 99 || strval(inputtext) < 18)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Invalid age specified");
                    ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Age", "Enter your age below", "Confirm", "");
                }
                else
                {
                    pInfo[playerid][pAge] = strval(inputtext);
                    format(string2, sizeof(string2), "Okay we know that you are "EMBED_WHITE"%d"EMBED_YELLOW" years old", pInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_YELLOW, string2);
                    pInfo[playerid][pTutorial] = 1;
                    TogglePlayerSpectating(playerid, false);
                    TextDrawShowForPlayer(playerid, textdrawVariables[0]);
                }
            }
            else
            {
                ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Login", "Enter your age below", "Confirm", "");
            }
        }
        case DIALOG_REGISTER_GENDER:
        {
            if(response)
            {
                if(listitem == 0)
                {
                    pInfo[playerid][pGender] = 1;
                    SendClientMessage(playerid, COLOR_YELLOW, "Okay, we now know that you are a male");
                    ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Age", "Enter your age below", "Confirm", "");
                }
                if(listitem == 1)
                {
                    pInfo[playerid][pGender] = 2;
                    SendClientMessage(playerid, COLOR_YELLOW, "Okay, we now know that you are a female");
                    ShowPlayerDialog(playerid,DIALOG_REGISTER_AGE, DIALOG_STYLE_INPUT, "Login", "Enter your age below", "Confirm", "");
                }
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_REGISTER_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Choose", "");
            }
        }
        case DIALOG_CREDITS1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Scripting
            {
                ShowPlayerDialog(playerid, DIALOG_CREDITS2, DIALOG_STYLE_LIST, "Scripting Credits", "ikbenremco - Basic Script found on SA-MP Forums\nGhost556 (Khyle_Thomas) - Editing the script", "Okay", "Cancel");
            }
            if(listitem == 1) // Mapping
            {
                ShowPlayerDialog(playerid, DIALOG_CREDITS3, DIALOG_STYLE_LIST, "Mapping Credits", "eMapper - School Interior\nWennicke - Hospital Interior\nStefand - All Saints General Hospital Car Park\nDopekill - Bank Exterior", "Okay", "Cancel");
            }
           
        }
        case DIALOG_JOBL1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Avalible Jobs
            {
                ShowPlayerDialog(playerid, DIALOG_JOBL2, DIALOG_STYLE_LIST, "Avalible Jobs", "Bus Driver\nTaxi Driver\nMechanic", "Okay", "Cancel");
            }
            if(listitem == 1) // Unavalible Jobs
            {
                ShowPlayerDialog(playerid, DIALOG_JOBL3, DIALOG_STYLE_LIST, "Unavalible Jobs", "Pilot\nTrucker\nFisherman", "Okay", "Cancel");
            }
           
        }
        case DIALOG_JOBL2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Bus Driver
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS1, DIALOG_STYLE_MSGBOX, "Bus Driver Job", "Bus Driver job - Unity Station\nAvalible vehicles - Bus, Coach\nJob Type - Checkpoints (Routes)", "Join", "Cancel");
            }
            if(listitem == 1) // Taxi Driver
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS2, DIALOG_STYLE_MSGBOX, "Taxi Driver Job", "Taxi Driver job - Unity Station\nAvalible vehicles - Taxi, Cabbie\nJob Type - Player interaction (Phonecalls)", "Join", "Cancel");
            }
            if(listitem == 2) // Mechanic
            {
                ShowPlayerDialog(playerid, DIALOG_JOBS3, DIALOG_STYLE_MSGBOX, "Mechanic Job", "Mechanic job - Unconfirmed\nAvalible vehicles - Utility truck, Utility trailer, Towtruck\nJob Type - Player interaction (Phonecalls)", "Join", "Cancel");
            }
        }
        case DIALOG_JOBS1:
        {
            if(response)
            {
                pInfo[playerid][pJob] = 1;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
                format(string2, sizeof(string2), "[Los Santos Bus Company] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 1774.5931,-1893.5642,13.3854, 2.0);
            }
        }
        case DIALOG_JOBS2:
        {
            if(response)
            {
                pInfo[playerid][pJob] = 2;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
                format(string2, sizeof(string2), "[Los Santos Taxi Service] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 1743.3228, -1863.0804, 13.5755, 2.0);
            }            ShowPlayerDialog(playerid, DIALOG_PDD0, DIALOG_STYLE_LIST, "Los Santos Police Department", "Duty\nArmory\nUniform\nHelp", "Join", "Cancel");
        }
        case DIALOG_JOBS3:
        {
            if(response)
            {
                pInfo[playerid][pJob] = 3;
                pInfo[playerid][pJobType] = 1;
                pInfo[playerid][pIsFinding] = 1;
                format(string2, sizeof(string2), "[Los Santos Garage] Welcome to the team %s, We have marked a marker on your gps to find the vehicles.", PlayerRPName(playerid));
                SetPlayerCheckpoint(playerid, 2330.9863, -2324.5244, 13.3828, 2.0);
            }
        }
        case DIALOG_PDD0:
        {
            if(!response) return 1;
           
            if(listitem == 0) // On Duty
            {
                SetPlayerHealth(playerid, 100);
                SetPlayerArmour(playerid, 100);
                pInfo[playerid][pDuty] = 1;
                SetPlayerColor(playerid, COLOR_BLUE);
                GivePlayerWeapon(playerid, 24, 9999);
                GivePlayerWeapon(playerid, 3, 9999);
                GivePlayerWeapon(playerid, 27, 9999);
                GivePlayerWeapon(playerid, 41, 9999);
            }
            else if(listitem == 1) // Armory
            {
                ShowPlayerDialog(playerid, DIALOG_PDD1, DIALOG_STYLE_LIST, "Los Santos Police Department Armory", "Nightstick\nDeagle\nShotgun\nM4\nSniper Rifle\nPepperspray", "Grab", "Cancel");
            }
            else if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_PDD2, DIALOG_STYLE_LIST, "Los Santos Police Department Uniforms", "Probationary Constable\nConstable - Leading Senior Constable\nSergeant - Senior Sergeant\nInspector - Chief Inspector\nSuperintendent - Chief Superintendent\nAssistant Commissioner - Senior Assistant Commissioner\nDeputy Commissioner\nCommissioner\nPublic Order And Riot Squad\nMotorcycle Uniform\nFemale Officer\nOff Duty clothes", "Grab", "Cancel");
            }
        }
        case DIALOG_PDD0A:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Off Duty
            {
                pInfo[playerid][pDuty] = 0;
                SetPlayerColor(playerid, COLOR_WHITE);
            }
            else if(listitem == 1) // Armory
            {
                ShowPlayerDialog(playerid, DIALOG_PDD1, DIALOG_STYLE_LIST, "Los Santos Police Department Armory", "Nightstick\nDeagle\nShotgun\nM4\nSniper Rifle\nPepperspray", "Grab", "Cancel");
            }
            else if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_PDD2, DIALOG_STYLE_LIST, "Los Santos Police Department Uniforms", "Probationary Constable\nConstable - Leading Senior Constable\nSergeant - Senior Sergeant\nInspector - Chief Inspector\nSuperintendent - Chief Superintendent\nAssistant Commissioner - Senior Assistant Commissioner\nDeputy Commissioner\nCommissioner\nPublic Order And Riot Squad\nMotorcycle Uniform\nFemale Officer\nOff Duty clothes", "Grab", "Cancel");
            }
        }
        case DIALOG_PDD1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Nightstick
            {
                GivePlayerWeapon(playerid, 3, 9999);
            }
            else if(listitem == 1) // Deagle
            {
                GivePlayerWeapon(playerid, 24, 9999);
            }
            else if(listitem == 2) // Shotgun
            {
                GivePlayerWeapon(playerid, 27, 9999);
            }
            else if(listitem == 3) // M4
            {
                GivePlayerWeapon(playerid, 31, 9999);
            }
            else if(listitem == 4) // Sniper Rifle
            {
                GivePlayerWeapon(playerid, 34, 9999);
            }
            else if(listitem == 5) // Pepperspray
            {
                GivePlayerWeapon(playerid, 41, 9999);
            }
            else if(listitem == 6) // Tear gas
            {
                GivePlayerWeapon(playerid, 17, 9999);
            }
        }
        case DIALOG_PDD2: // LSPD Uniforms
        {
            if(!response) return 1;
           
            if(listitem == 0) // Probationary Constable
            {
                SetPlayerSkin(playerid, 71);
            }
            else if(listitem == 1) // Constable - Leading Senior Constable
            {
               
                SetPlayerSkin(playerid, 280);
            }
            else if(listitem == 2) // Sergeant - Senior Sergeant Commissioner\nOff Duty clothes", "Grab", "Cancel");
           
            {
               
                SetPlayerSkin(playerid, 280);
            }
            else if(listitem == 3) // Inspector - Chief Inspector
            {
               
                SetPlayerSkin(playerid, 281);
            }
            else if(listitem == 4) // Superintendent - Chief Superintendent
            {
               
                SetPlayerSkin(playerid, 282);
            }
            else if(listitem == 5) // Assistant Commissioner - Senior Assistant Commissioner
            {
               
                SetPlayerSkin(playerid, 287);
            }
            else if(listitem == 6) // Deputy Commissioner
            {
               
                SetPlayerSkin(playerid, 283);
            }
            else if(listitem == 7) // Commissioner
            {
               
                SetPlayerSkin(playerid, 288);
            }
            else if(listitem == 8) // Public Order And Riot Squad
            {
               
                SetPlayerSkin(playerid, 285);
            }
            else if(listitem == 9) // Bike Patrol
            {
               
                SetPlayerSkin(playerid, 284);
            }
            else if(listitem == 10) // Female Skin
            {
               
                SetPlayerSkin(playerid, 211);
            }
            else if(listitem == 11) // Off duty Skin
            {
                SetPlayerSkin(playerid, pInfo[playerid][pOldSkin]);
            }
        }
        case DIALOG_PDMDC1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Login
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC2, DIALOG_STYLE_LIST, "Los Santos Police Department Home", "Tickets\nWarrants\nLicense plates\nRecent 911 calls\nRequest Assistance\n", "Select", "Quit");
            }
            else if(listitem == 1) // Quit
            {
            }
        }
        case DIALOG_PDMDC2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Tickets
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC3, DIALOG_STYLE_LIST, "Los Santos Police Department Tickets", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
            else if(listitem == 1) // Warrants
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC4, DIALOG_STYLE_LIST, "Los Santos Police Department Warrants", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
            else if(listitem == 2) // License plates
            {
            }
            else if(listitem == 3) // Recent 911 calls
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC6, DIALOG_STYLE_LIST, "Los Santos Police Department 911 Calls", "\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s\n[%s %s] %s", "Select", "Quit");
            }
            else if(listitem == 4) // Request Assistance
            {
                ShowPlayerDialog(playerid, DIALOG_PDMDC7, DIALOG_STYLE_LIST, "Los Santos Police Department Backup", "Patrol Cruisers\nPatrol Helicopters\nPublic Order And Riot Squad\nDetectives\nParamedics\nFire Units", "Select", "Quit");
            }
        }
        case DIALOG_PDMDC7:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Patrol Cars
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires additional patrol cruisers at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 1) // Patrol Helicopters
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires additional patrol helicopters at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 2) // Public Order And Riot Squad
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 3) // Detectives
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Detective assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(1, TEAM_BLUE_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 4) // Paramedics
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(2, TEAM_PINK_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
            else if(listitem == 5) // Fire Fighters
            {
                new zone[MAX_ZONE_NAME], Float:bkx, Float:bky, Float:bkz;
                GetPlayerPos(playerid, bkx, bky, bkz);
                format(string2, sizeof(string2), "[Dispatch] [%s] [%s] has pressed their assistance button, and requires Public Order And Riot Squad members assistance at %s", GetPlayerRank(playerid),PlayerRPName(playerid),zone);
                SendRadioMessage(3, TEAM_RED_COLOR, string2);
                foreach(Player, i)
                SetPlayerMarkerForPlayer(i,playerid,0xFF0000FF);
            }
        }
        case DIALOG_LIC1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Car License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC2, DIALOG_STYLE_MSGBOX, "Car License", "Car License - Drive legally in Los Santos so you will not be arrested for driving without a license, Fines apply and risk jail time.\nCost - $1500", "Buy", "Cancel");
            }
            else if(listitem == 1) // Motorbike License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC3, DIALOG_STYLE_MSGBOX, "Motorbike License", "Motorbike License - Ride legally in Los Santos so you will not be arrested for driving without a license, Fines apply and risk jail time.\nCost - $3500", "Buy", "Cancel");
            }
            else if(listitem == 2) // Public Transport License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC4, DIALOG_STYLE_MSGBOX, "Public Transport License", "Public Transport License - Ever wanted to drive a public bus, taxi or train? To get those jobs you are required to have this license\nIf you are found driving a bus, taxi or train without a Public transport license you will be arrested by Law enforcement members.\nCost - $3500", "Buy", "Cancel");
            }
            else if(listitem == 3) // Trucker License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC5, DIALOG_STYLE_MSGBOX, "Trucker License", "Trucker License - Ever wanted to drive a van or truck? To get those jobs you are required to have this license, If you are found driving a van or truck without a Trucker license you will be arrested by Law enforcement members.\nCost - $3500", "Buy", "Cancel");
            }
            else if(listitem == 4) // Pilot License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Pilot License", "Pilot License - Ever wanted to fly a private jet or plane? To get the pilot job you are required to have this license, If you are found flying a private jet or plane without a Pilot license you will be arrested by Law enforcement members.\nCost - $5500", "Buy", "Cancel");
            }
            else if(listitem == 5) // Weapon License
            {
                ShowPlayerDialog(playerid, DIALOG_LIC7, DIALOG_STYLE_MSGBOX, "Weapon License", "Weapon License - Ever wanted to buy or own a legal firearm? To buy a firearm from legal establishments you are required to have this license, If you are found holding a firearm without a weapons license you will be arrested by Law enforcement members and your weapons will be taken off of you.\nCost - $11500", "Buy", "Cancel");
            }
        }
        case DIALOG_LIC2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Car License
            {
                GivePlayerMoney(playerid, -1500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Car License and can now drive legally around Los Santos.");
                pInfo[playerid][pDLic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pDLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your drivers license for Los Santos.");
            }
        }
        case DIALOG_LIC3:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Motorbike License
            {
                GivePlayerMoney(playerid, -3500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Car License and can now drive legally around Los Santos.");
                pInfo[playerid][pMLic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your drivers license for Los Santos.");
            }
        }
        case DIALOG_LIC4:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Public Transport License
            {
                GivePlayerMoney(playerid, -3500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Public Transport License and can now drive and operate busses, taxis and trains legally around Los Santos.");
                pInfo[playerid][pT1Lic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your Public Transport License for Los Santos.");
            }
        }
        case DIALOG_LIC5:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Buy Trucker License
            {
                GivePlayerMoney(playerid, -3500);
                SendClientMessage(playerid, COLOR_YELLOW, "You have bought a Trucker License and can now drive and operate vans and trucks, legally around Los Santos.");
                pInfo[playerid][pT2Lic] = 1;
            }
            else
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
                if(pInfo[playerid][pMLic] == 1) return SendClientMessage(playerid, COLOR_RED, "You have already brought your Public Transport License for Los Santos.");
            }
        }
        case DIALOG_ONL1:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Ads
            {
                ShowPlayerDialog(playerid, DIALOG_ONL3, DIALOG_STYLE_LIST, "Advertisment Homepage", "Place an online ad\nPlace an offline ad\nHelp", "Select", "Cancel");
            }
            else if(listitem == 1) // Email
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Email Homepage", "Email Someone\nCheck Emails\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 2) // Laws
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 3) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Help", "General Help", "Select", "Cancel");
            }
            else if(listitem == 4) // Updates
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Updates on the Server", "Current Updates/nUpdates planned in the next update/nUpdate Suggestion", "Select", "Cancel");
            }
        }
        case DIALOG_ONL2:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Online Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL3, DIALOG_STYLE_LIST, "Advertisment Homepage", "Place an online ad\nPlace an offline ad\nView recent online ads\nHelp", "Select", "Cancel");
            }
            else if(listitem == 1) // Offline Ad
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Email Homepage", "Email Someone\nCheck Emails\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 2) // Laws
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "Buy", "Cancel");
            }
            else if(listitem == 3) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Help", "General Help", "Select", "Cancel");
            }
            else if(listitem == 4) // Updates
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_LIST, "Updates on the Server", "Current Updates/nUpdates planned in the next update/nUpdate Suggestion", "Select", "Cancel");
                return 1;
            }
        }/*
        case DIALOG_ONL3:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Online Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL4, DIALOG_STYLE_INPUT, "Online Advertisment", "ad", "Place", "Cancel");
            }
            else if(listitem == 1) // Offline Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL5, DIALOG_STYLE_INPUT, "Offline Advertisment", "ad", "Place", "Cancel");
            }
            else if(listitem == 2) // Recent Ad
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Recent Online ads", "[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]", "See", "Cancel");
            }
            else if(listitem == 2) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_LIC6, DIALOG_STYLE_MSGBOX, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "See", "Cancel");
            }
        }*/

        case DIALOG_ONL3:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Online Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL4, DIALOG_STYLE_LIST, "Online Advertisment", "Advertisment text\nPublisher name\nContact information\nPlace online ad", "Place", "Cancel");
            }
            else if(listitem == 1) // Offline Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL5, DIALOG_STYLE_LIST, "Offline Advertisment", "Advertisment text\nPublisher name\nContact information", "Place", "Cancel");
            }
            else if(listitem == 2) // Recent Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL6, DIALOG_STYLE_MSGBOX, "Recent Online ads", "[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]\n[%s]", "See", "Cancel");
            }
            else if(listitem == 2) // Help
            {
                ShowPlayerDialog(playerid, DIALOG_ONL7, DIALOG_STYLE_MSGBOX, "Los Santos Laws", "Traffic Laws\nGeneral Laws\nHelp", "See", "Cancel");
            }
        }
        case DIALOG_ONL4:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL8, DIALOG_STYLE_INPUT, "What do you want the ad to say?", "ad", "Set", "Cancel");
            }
            else if(listitem == 1) // Playername
            {
                ShowPlayerDialog(playerid, DIALOG_ONL9, DIALOG_STYLE_INPUT, "What is the publisher's name?", "name", "Set", "Cancel");
            }
            else if(listitem == 2) // Contact
            {
                ShowPlayerDialog(playerid, DIALOG_ONL10, DIALOG_STYLE_INPUT, "Contact Information", "cinfo", "Set", "Cancel");
            }
            else if(listitem == 2) // Place
            {
                ShowPlayerDialog(playerid, DIALOG_ONL11, DIALOG_STYLE_LIST, "Do you want to place the ad?", "Place\nDon't place", "Place", "Don't place");
            }
        }
        case DIALOG_ONL8:
        {
            if(!response) return 1;
           
            if(listitem == 0) // Ad
            {
                ShowPlayerDialog(playerid, DIALOG_ONL8, DIALOG_STYLE_INPUT, "What do you want the ad to say?", "ad", "Set", "Cancel");
            }
            else if(listitem == 1) // Playername
            {
                ShowPlayerDialog(playerid, DIALOG_ONL9, DIALOG_STYLE_INPUT, "What is the publisher's name?", "name", "Set", "Cancel");
            }
            else if(listitem == 2) // Contact
            {
                ShowPlayerDialog(playerid, DIALOG_ONL10, DIALOG_STYLE_INPUT, "Contact Information", "cinfo", "Set", "Cancel");
            }
            else if(listitem == 2) // Place
            {
                ShowPlayerDialog(playerid, DIALOG_ONL11, DIALOG_STYLE_LIST, "Do you want to place the ad?", "Place\nDon't place", "Place", "Don't place");
            }
        }
        case DIALOG_ACC:
        {
            if(!response) return 1;
           
            else if(listitem == 0)
            {
                SetPVarString(playerid,"Accent", "American");
            }
            else if(listitem == 1)
            {
                SetPVarString(playerid,"Accent", "Dutch");
            }
            else if(listitem == 2)
            {
                SetPVarString(playerid,"Accent","British");
            }
            else if(listitem == 3)
            {
                SetPVarString(playerid,"Accent","Italian");
            }
            else if(listitem == 4)
            {
                SetPVarString(playerid,"Accent","Dutch");
            }
            else if(listitem == 5)
            {
                SetPVarString(playerid,"Accent","French");
            }
            else if(listitem == 6)
            {
                SetPVarString(playerid,"Accent","Australian");
            }
            else if(listitem == 7)
            {
                SetPVarString(playerid,"Accent","African");
            }
            else if(listitem == 8)
            {
                SetPVarString(playerid,"Accent","Chinese");
            }
        }
        case DIALOG_PDS1:
        {
            if(!response) return 1;
           
            else if(listitem == 0) // LSPD
            {
                LSPDV[0] = AddStaticVehicle(596,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 1) // SFPD
            {
                LSPDV[1] = AddStaticVehicle(597,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 2) // LVPD
            {
                LSPDV[2] = AddStaticVehicle(598,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 3) // Enforcer
            {
                LSPDV[3] = AddStaticVehicle(427,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 4) // Merits
            {
                LSPDV[4] = AddStaticVehicle(551,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 5) // Cheetahs
            {
                LSPDV[5] = AddStaticVehicle(415,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 6) // Bike
            {
                LSPDV[6] = AddStaticVehicle(523,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
            else if(listitem == 7) // Helicopter
            {
                LSPDV[7] = AddStaticVehicle(497,1593.3845,-1640.0796,13.5499,265.6349,0,1);
            }
        }
        case DIALOG_AMENU1:
        {
            if(!response) return 1;
           
            else if(listitem == 0) // Player Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU2, DIALOG_STYLE_LIST, "Australian Roleplay Server Player Commands", "Set Player Skin\nSet Player Score\nSet Player Cash\nMake Faction Leader", "Command","Exit");
            }
            else if(listitem == 1) // Dynamic Lists
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU3, DIALOG_STYLE_LIST, "Australian Roleplay Server Dynamic Lists", "Dynamic Houses\nDynamic Apartments\nDynamic Businesses\nDynamic Doors", "Command","Exit");
            }
            else if(listitem == 2) // Misc Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_LIST, "Australian Roleplay Server Misc Commands", "Admin Duty\nWarn Player\nAjail Player\nKick Player\nBan Player/nTeleport Player to Coords/nTeleport Player to You\nTeleport Player to location", "Command","Exit");
            }
        }
        case DIALOG_AMENU2: // Player Commands
        {
            if(!response) return 1;
           
            else if(listitem == 0) // Set Player Skin
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their skin.","Select","Cancel");
            }
            else if(listitem == 1) // Set Player Score
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU5, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their score.","Select","Cancel");
            }
            else if(listitem == 2) // Set Player Cash
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU1, DIALOG_STYLE_INPUT, "Type The Player ID","Type the ID of the player you want to edit their cash.","Select","Cancel");
            }
        }
        case DIALOG_AMENU3:
        {
            if(!response) return 1;
           
            else if(listitem == 0) // Player Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU2, DIALOG_STYLE_LIST, "Australian Roleplay Server Player Commands", "Set Player Skin\nSet Player Score\nSet Player Cash\nMake Faction Leader", "Command","Exit");
            }
            else if(listitem == 1) // Dynamic Lists
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU3, DIALOG_STYLE_LIST, "Australian Roleplay Server Dynamic Lists", "Dynamic Houses\nDynamic Apartments\nDynamic Businesses\nDynamic Doors", "Command","Exit");
            }
            else if(listitem == 2) // Misc Commands
            {
                ShowPlayerDialog(playerid, DIALOG_AMENU4, DIALOG_STYLE_LIST, "Australian Roleplay Server Misc Commands", "Admin Duty\nWarn Player\nAjail Player\nKick Player\nBan Player/nTeleport Player to Coords/nTeleport Player to You\nTeleport Player to location", "Command","Exit");
            }
        }
        case DIALOG_AMENU4: // Skin set
        {
            if(response)
            {
                targetID = strval(inputtext);
                if(IsPlayerConnected(targetID))
                {
                    ShowPlayerDialog(playerid, DIALOG_AMENU4A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the wanted skin number, you want to give the player.", "Next", "Close");
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
                    return 1;
                }
            }
            else if(!response)
            {
                SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
            }
        }
        case DIALOG_AMENU4A: // Skin set 2
        {
            if(response)
            {
                new skinid, message[64];
                skinid = strval(inputtext);
                if(skinid < 0 || skinid > 299)
                {
                    SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
                }
                else
                {
                    SetPlayerSkin(targetID, skinid);
                    format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, skinid);
                    SendClientMessage(playerid, 0x33FF33AA, message);
                }
            }
        }
        case DIALOG_AMENU5: // Score set
        {
            if(response)
            {
                targetID = strval(inputtext);
                if(IsPlayerConnected(targetID))
                {
                    ShowPlayerDialog(playerid, DIALOG_AMENU5A, DIALOG_STYLE_INPUT, "Australian Roleplay Server Admin Menu", "Enter in the player id, you want the code to effect.", "Next", "Close");
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] We could not find a player with that ID.");
                    return 1;
                }
            }
            else if(!response)
            {
                SendClientMessage(playerid, 0xFFFFFFF,"[ARPS] You do not have the required admin level, to use this command.");
            }
        }
        case DIALOG_AMENU5: // Score set 2
        {
            if(response)
            {
                new score, message[64];
                score = strval(inputtext);
                if(score < 0 || score > 999)
                {
                    SendClientMessage(playerid, 0x33FF33AA, "[ARPS] Scores can only be changed between 0 and 999.");
                }
                else
                {
                    SetPlayerScore(targetID, score);
                    format(message, sizeof(message), "You have successfully changed %d skin id to %d.", targetID, score);
                    SendClientMessage(playerid, 0x33FF33AA, message);
                }
                return 1;
            }
        }
    }
    return 1;
}
Thanks mate, simple mistake and simple fix.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)