Issue Compiling /Search command with Dialog box
#1

Код:
//Created by BrianSherbino&Felipe(2013)

#include <a_samp>
#include <zcmd>


#define FILTERSCIPT
#define DIALOG_LOCATIONS
#define DIALOG_LOCATIONS2
#define DIALOG_LOCATIONS3
#define COLOR_WHITE 0xFFFFFF00

CMD:search(playerid, params[]);
{
	ShowPlayerDialog(playerid, DIALOG_LOCATIONS, DIALOG_STYLE_LIST, "Where would you like to go?", "{00B000}Job Locations \n{00B000}Shop Locations", "OK", "Cancel");
}


public OnDialogResponse(playerid, dialogid, response listitem inputtext[]);
{

if(dialogid ==  DIALOG_LOCATIONS);
	{
	if(response)
		{
		    if(listitem == 0)
			{
				ShowPlayerDialog(playerid, DIALOG_LOCATIONS2, DIALOG_STYLE_LIST, "These are the Job Opportunities", "{00B000}Detective\n{00B000}Lawyer\n{00B000}Whore\n{00B000}Drug Dealer\n{00B000}Mechanic\n{00B000}Bodyguard\n{00B000}Arms Dealer\n{00B000}Boxer\n{00B000}Drug Smuggler\n{00B000}Taxi Driver\n{00B000}Craftsman\n{00B000}Bartender\n{00B000}Trucker\n{00B000}Pizza Boy", "Search", "Cancel");
			}
			if(listitem == 1
			{
			    ShowPlayerDialog(playerid, DIALOG_LOCATIONS3, DYALOG_STYLE_LIST, "These are Public Stores", "{00B000}24/7\n{00B000}Clothing\n{00B000}Gas Station\n{00B000}Bank", "Search", "Cancel");
			}

if(dialogid ==  DIALOG_LOCATIONS2)
	{
	if(response)
		{
		    if(listitem == 0)
			{
			//Detective
			SetPlayerCheckpoint(playerid, 1554.5299,-1675.7255,16.1953,248.8255);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Detective Job!");
			} 
			
			if(listitem == 1)
			{
			//Lawyer
			SetPlayerCheckpoint(playerid, 1380.8903,-1088.7090,27.3844,81.7233);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Lawyer Job!");
			}
			
			if(listitem == 2)
			//Whore
            SetPlayerCheckpoint(playerid, 2421.3484,-1219.7549,25.5293,8.2249);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Whore Job!");
            }

			if(listitem == 3)
			{
			//Drug Dealer
			SetPlayerCheckpoint(playerid, 2166.2080,-1675.5850,15.0859,302.2476);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Dealer Job!");
			}

			if(listitem == 4)
			{
			//Mechanic
			SetPlayerCheckpoint(playerid, 161.8671,-25.7934,1.5781,30.9028, 3.0);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Mechnic Job!");
			}

			if(listitem == 5)
			{
			//Bodyguard
			SetPlayerCheckpoint(playerid, 2226.1838,-1717.9741,13.5141,191.8607);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bodyguard Job!");
			}

			if(listitem == 6)
			{
			//Arms Dealer
			SetPlayerCheckpoint(playerid, 1366.4833,-1275.1704,13.5469,226.5078);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Arms Dealer Job!");
			}

			if(listitem == 7)
			{
			//Boxer
			SetPlayerCheckpoint(playerid, 2229.0835,-1721.3661,13.5616,281.8607);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Boxer Job!");
			}

			if(listitem == 8)
			{
			//Drug Smuggler
			SetPlayerCheckpoint(playerid, 1147.8317,-1202.5688,19.5329,47.7760);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Smuggler Job!");
			}

			if(listitem == 9)
			{
			//Taxi Driver
			SetPlayerCheckpoint(playerid, 1741.3721,-1863.6953,13.5748,212.6972);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Taxi Driver Job!");
			}

			if(listitem == 10)
			{
			//Craftsman
			SetPlayerCheckpoint(playerid, 2196.2397,-1973.8779,13.5588,15.0760);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Craftsman Job!");
			}
			
			if(listitem == 11)
			{
			//Bartender
			SetPlayerCheckpoint(playerid, 1836.7444,-1682.5688,13.3352);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bartender Job!");
			}
			
			if(listitem == 12)
			{
			//Trucker
			SetPlayerCheckpoint(playerid, 2453.4246,-2117.8496,13.5469,357.0474);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Trucker Job!");
			}
			
			if(listitem == 13)
			{
			//Pizza Boy
			SetPlayerCheckpoint(playerid, 2107.5710,-1785.0699,13.3870,289.3750);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Pizza Boy Job!");
			}
}

if(dialogid ==  DIALOG_LOCATIONS3);
	{
	if(response);
	    {
	    	if(listitem == 0)
			{
			//24/7
			SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the 24/7 Market !");
			}

			if(listitem == 1)
			{
			//Clothing
			SetPlayerCheckpoint(playerid, 2244.7283,-1664.9279,15.4766,159.8232);
			SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Binco!");
			}

			if(listitem == 2)
			//Gas Station
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Gas Station!");
            }
            
            if(listitem == 3)
			//Bank
            SetPlayerCheckpoint(playerid, 1457.0648,-1016.2921,25.8818,355.4666);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Bank !");
            }
   }
this is the compiler error:

:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(14) : error 055: start of function body without function header
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(19) : error 001: expected token: ")", but found "-identifier-"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(19) : error 017: undefined symbol "listitem"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(22) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(24) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(26) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(30) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(35) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(37) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(39) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(42) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(46) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(49) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(53) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(55) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(59) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(62) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(66) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(69) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(73) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(76) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(80) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(83) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(87) : error 010: invalid function or declaration
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(90) : error 021: symbol already defined: "SetPlayerCheckpoint"
C:\Users\Brian\Desktop\SA-MP Folder\filterscripts\Locations.pwn(94) : error 010: invalid function or declaration

Any idea/solutions to fix that?
Reply
#2

Please put all the code in [ Code ] [ / Code ]
Reply
#3

Done
Reply
#4

Код:
CMD:search(playerid, params[]);
You stuck a semicolon on the end of that, where it should not be.

Easy mistake... I have done it a lot myself.
Reply
#5

And not only.

Do not use semicolon at the end of an if statement or public.
pawn Код:
CMD:search(playerid, params[]);

public OnDialogResponse(playerid, dialogid, response listitem inputtext[]);

if(dialogid ==  DIALOG_LOCATIONS);

if(dialogid ==  DIALOG_LOCATIONS3);

if(response);

// Remove all those semicolons from the end


if(listitem == 1

// missing a closed parenthesis after 1
Reply
#6

pawn Код:
//Created by BrianSherbino&Felipe(2013)

#include <a_samp>
#include <zcmd>


#define FILTERSCIPT
#define DIALOG_LOCATIONS 0
#define DIALOG_LOCATIONS2 1
#define DIALOG_LOCATIONS3 2
#define COLOR_WHITE 0xFFFFFF00

CMD:search(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_LOCATIONS, DIALOG_STYLE_LIST, "Where would you like to go?", "{00B000}Job Locations \n{00B000}Shop Locations", "OK", "Cancel");
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid ==  DIALOG_LOCATIONS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS2, DIALOG_STYLE_LIST, "These are the Job Opportunities", "{00B000}Detective\n{00B000}Lawyer\n{00B000}Whore\n{00B000}Drug Dealer\n{00B000}Mechanic\n{00B000}Bodyguard\n{00B000}Arms Dealer\n{00B000}Boxer\n{00B000}Drug Smuggler\n{00B000}Taxi Driver\n{00B000}Craftsman\n{00B000}Bartender\n{00B000}Trucker\n{00B000}Pizza Boy", "Search", "Cancel");
            }
            if(listitem == 1)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS3, DYALOG_STYLE_LIST, "These are Public Stores", "{00B000}24/7\n{00B000}Clothing\n{00B000}Gas Station\n{00B000}Bank", "Search", "Cancel");
            }
        }
    }  
    if(dialogid ==  DIALOG_LOCATIONS2)
    {
        if(response)
        {
            if(listitem == 0)
            {
            //Detective
            SetPlayerCheckpoint(playerid, 1554.5299,-1675.7255,16.1953,248.8255);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Detective Job!");
            }
           
            if(listitem == 1)
            {
            //Lawyer
            SetPlayerCheckpoint(playerid, 1380.8903,-1088.7090,27.3844,81.7233);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Lawyer Job!");
            }
           
            if(listitem == 2)
            {
            //Whore
            SetPlayerCheckpoint(playerid, 2421.3484,-1219.7549,25.5293,8.2249);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Whore Job!");
            }

            if(listitem == 3)
            {
            //Drug Dealer
            SetPlayerCheckpoint(playerid, 2166.2080,-1675.5850,15.0859,302.2476);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Dealer Job!");
            }

            if(listitem == 4)
            {
            //Mechanic
            SetPlayerCheckpoint(playerid, 161.8671,-25.7934,1.5781,30.9028, 3.0);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Mechnic Job!");
            }

            if(listitem == 5)
            {
            //Bodyguard
            SetPlayerCheckpoint(playerid, 2226.1838,-1717.9741,13.5141,191.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bodyguard Job!");
            }

            if(listitem == 6)
            {
            //Arms Dealer
            SetPlayerCheckpoint(playerid, 1366.4833,-1275.1704,13.5469,226.5078);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Arms Dealer Job!");
            }

            if(listitem == 7)
            {
            //Boxer
            SetPlayerCheckpoint(playerid, 2229.0835,-1721.3661,13.5616,281.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Boxer Job!");
            }

            if(listitem == 8)
            {
            //Drug Smuggler
            SetPlayerCheckpoint(playerid, 1147.8317,-1202.5688,19.5329,47.7760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Smuggler Job!");
            }

            if(listitem == 9)
            {
            //Taxi Driver
            SetPlayerCheckpoint(playerid, 1741.3721,-1863.6953,13.5748,212.6972);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Taxi Driver Job!");
            }

            if(listitem == 10)
            {
            //Craftsman
            SetPlayerCheckpoint(playerid, 2196.2397,-1973.8779,13.5588,15.0760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Craftsman Job!");
            }
           
            if(listitem == 11)
            {
            //Bartender
            SetPlayerCheckpoint(playerid, 1836.7444,-1682.5688,13.3352);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bartender Job!");
            }
           
            if(listitem == 12)
            {
            //Trucker
            SetPlayerCheckpoint(playerid, 2453.4246,-2117.8496,13.5469,357.0474);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Trucker Job!");
            }
           
            if(listitem == 13)
            {
            //Pizza Boy
            SetPlayerCheckpoint(playerid, 2107.5710,-1785.0699,13.3870,289.3750);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Pizza Boy Job!");
            }
        }  
    }

    if(dialogid ==  DIALOG_LOCATIONS3);
    {
        if(response);
        {
            if(listitem == 0)
            {
            //24/7
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the 24/7 Market !");
            }

            if(listitem == 1)
            {
            //Clothing
            SetPlayerCheckpoint(playerid, 2244.7283,-1664.9279,15.4766,159.8232);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Binco!");
            }

            if(listitem == 2)
            {
            //Gas Station
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Gas Station!");
            }
           
            if(listitem == 3)
            {
            //Bank
            SetPlayerCheckpoint(playerid, 1457.0648,-1016.2921,25.8818,355.4666);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Bank !");
            }
        }  
   }
   return 1;
}
Reply
#7

Quote:
Originally Posted by Aliassassin123456
Посмотреть сообщение
pawn Код:
//Created by BrianSherbino&Felipe(2013)

#include <a_samp>
#include <zcmd>


#define FILTERSCIPT
#define DIALOG_LOCATIONS 0
#define DIALOG_LOCATIONS2 1
#define DIALOG_LOCATIONS3 2
#define COLOR_WHITE 0xFFFFFF00

CMD:search(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_LOCATIONS, DIALOG_STYLE_LIST, "Where would you like to go?", "{00B000}Job Locations \n{00B000}Shop Locations", "OK", "Cancel");
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid ==  DIALOG_LOCATIONS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS2, DIALOG_STYLE_LIST, "These are the Job Opportunities", "{00B000}Detective\n{00B000}Lawyer\n{00B000}Whore\n{00B000}Drug Dealer\n{00B000}Mechanic\n{00B000}Bodyguard\n{00B000}Arms Dealer\n{00B000}Boxer\n{00B000}Drug Smuggler\n{00B000}Taxi Driver\n{00B000}Craftsman\n{00B000}Bartender\n{00B000}Trucker\n{00B000}Pizza Boy", "Search", "Cancel");
            }
            if(listitem == 1)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS3, DYALOG_STYLE_LIST, "These are Public Stores", "{00B000}24/7\n{00B000}Clothing\n{00B000}Gas Station\n{00B000}Bank", "Search", "Cancel");
            }
        }
    }  
    if(dialogid ==  DIALOG_LOCATIONS2)
    {
        if(response)
        {
            if(listitem == 0)
            {
            //Detective
            SetPlayerCheckpoint(playerid, 1554.5299,-1675.7255,16.1953,248.8255);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Detective Job!");
            }
           
            if(listitem == 1)
            {
            //Lawyer
            SetPlayerCheckpoint(playerid, 1380.8903,-1088.7090,27.3844,81.7233);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Lawyer Job!");
            }
           
            if(listitem == 2)
            {
            //Whore
            SetPlayerCheckpoint(playerid, 2421.3484,-1219.7549,25.5293,8.2249);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Whore Job!");
            }

            if(listitem == 3)
            {
            //Drug Dealer
            SetPlayerCheckpoint(playerid, 2166.2080,-1675.5850,15.0859,302.2476);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Dealer Job!");
            }

            if(listitem == 4)
            {
            //Mechanic
            SetPlayerCheckpoint(playerid, 161.8671,-25.7934,1.5781,30.9028, 3.0);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Mechnic Job!");
            }

            if(listitem == 5)
            {
            //Bodyguard
            SetPlayerCheckpoint(playerid, 2226.1838,-1717.9741,13.5141,191.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bodyguard Job!");
            }

            if(listitem == 6)
            {
            //Arms Dealer
            SetPlayerCheckpoint(playerid, 1366.4833,-1275.1704,13.5469,226.5078);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Arms Dealer Job!");
            }

            if(listitem == 7)
            {
            //Boxer
            SetPlayerCheckpoint(playerid, 2229.0835,-1721.3661,13.5616,281.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Boxer Job!");
            }

            if(listitem == 8)
            {
            //Drug Smuggler
            SetPlayerCheckpoint(playerid, 1147.8317,-1202.5688,19.5329,47.7760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Smuggler Job!");
            }

            if(listitem == 9)
            {
            //Taxi Driver
            SetPlayerCheckpoint(playerid, 1741.3721,-1863.6953,13.5748,212.6972);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Taxi Driver Job!");
            }

            if(listitem == 10)
            {
            //Craftsman
            SetPlayerCheckpoint(playerid, 2196.2397,-1973.8779,13.5588,15.0760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Craftsman Job!");
            }
           
            if(listitem == 11)
            {
            //Bartender
            SetPlayerCheckpoint(playerid, 1836.7444,-1682.5688,13.3352);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bartender Job!");
            }
           
            if(listitem == 12)
            {
            //Trucker
            SetPlayerCheckpoint(playerid, 2453.4246,-2117.8496,13.5469,357.0474);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Trucker Job!");
            }
           
            if(listitem == 13)
            {
            //Pizza Boy
            SetPlayerCheckpoint(playerid, 2107.5710,-1785.0699,13.3870,289.3750);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Pizza Boy Job!");
            }
        }  
    }

    if(dialogid ==  DIALOG_LOCATIONS3);
    {
        if(response);
        {
            if(listitem == 0)
            {
            //24/7
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the 24/7 Market !");
            }

            if(listitem == 1)
            {
            //Clothing
            SetPlayerCheckpoint(playerid, 2244.7283,-1664.9279,15.4766,159.8232);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Binco!");
            }

            if(listitem == 2)
            {
            //Gas Station
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Gas Station!");
            }
           
            if(listitem == 3)
            {
            //Bank
            SetPlayerCheckpoint(playerid, 1457.0648,-1016.2921,25.8818,355.4666);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Bank !");
            }
        }  
   }
   return 1;
}
You made the same semicolon errors all throughout this, kind of a pointless thing to have in a FS anywhoo.
Reply
#8

pawn Код:
//Created by BrianSherbino&Felipe(2013)

#include <a_samp>
#include <zcmd>

#pragma tabsize 0
#define FILTERSCIPT
#define DIALOG_LOCATIONS 0
#define DIALOG_LOCATIONS2 1
#define DIALOG_LOCATIONS3 2
#define COLOR_WHITE 0xFFFFFF00

CMD:search(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_LOCATIONS, DIALOG_STYLE_LIST, "Where would you like to go?", "{00B000}Job Locations \n{00B000}Shop Locations", "OK", "Cancel");
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid ==  DIALOG_LOCATIONS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS2, DIALOG_STYLE_LIST, "These are the Job Opportunities", "{00B000}Detective\n{00B000}Lawyer\n{00B000}Whore\n{00B000}Drug Dealer\n{00B000}Mechanic\n{00B000}Bodyguard\n{00B000}Arms Dealer\n{00B000}Boxer\n{00B000}Drug Smuggler\n{00B000}Taxi Driver\n{00B000}Craftsman\n{00B000}Bartender\n{00B000}Trucker\n{00B000}Pizza Boy", "Search", "Cancel");
            }
            if(listitem == 1)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS3, DIALOG_STYLE_LIST, "These are Public Stores", "{00B000}24/7\n{00B000}Clothing\n{00B000}Gas Station\n{00B000}Bank", "Search", "Cancel");
            }
        }
    }
    if(dialogid ==  DIALOG_LOCATIONS2)
    {
        if(response)
        {
            if(listitem == 0)
            {
            //Detective
            SetPlayerCheckpoint(playerid, 1554.5299,-1675.7255,16.1953,248.8255);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Detective Job!");
            }

            if(listitem == 1)
            {
            //Lawyer
            SetPlayerCheckpoint(playerid, 1380.8903,-1088.7090,27.3844,81.7233);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Lawyer Job!");
            }

            if(listitem == 2)
            {
            //Whore
            SetPlayerCheckpoint(playerid, 2421.3484,-1219.7549,25.5293,8.2249);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Whore Job!");
            }

            if(listitem == 3)
            {
            //Drug Dealer
            SetPlayerCheckpoint(playerid, 2166.2080,-1675.5850,15.0859,302.2476);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Dealer Job!");
            }

            if(listitem == 4)
            {
            //Mechanic
            SetPlayerCheckpoint(playerid, 161.8671,-25.7934,1.5781,30.9028, 3.0);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Mechnic Job!");
            }

            if(listitem == 5)
            {
            //Bodyguard
            SetPlayerCheckpoint(playerid, 2226.1838,-1717.9741,13.5141,191.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bodyguard Job!");
            }

            if(listitem == 6)
            {
            //Arms Dealer
            SetPlayerCheckpoint(playerid, 1366.4833,-1275.1704,13.5469,226.5078);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Arms Dealer Job!");
            }

            if(listitem == 7)
            {
            //Boxer
            SetPlayerCheckpoint(playerid, 2229.0835,-1721.3661,13.5616,281.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Boxer Job!");
            }

            if(listitem == 8)
            {
            //Drug Smuggler
            SetPlayerCheckpoint(playerid, 1147.8317,-1202.5688,19.5329,47.7760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Smuggler Job!");
            }

            if(listitem == 9)
            {
            //Taxi Driver
            SetPlayerCheckpoint(playerid, 1741.3721,-1863.6953,13.5748,212.6972);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Taxi Driver Job!");
            }

            if(listitem == 10)
            {
            //Craftsman
            SetPlayerCheckpoint(playerid, 2196.2397,-1973.8779,13.5588,15.0760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Craftsman Job!");
            }

            if(listitem == 11)
            {
            //Bartender
            SetPlayerCheckpoint(playerid, 1836.7444,-1682.5688,13.3352);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bartender Job!");
            }

            if(listitem == 12)
            {
            //Trucker
            SetPlayerCheckpoint(playerid, 2453.4246,-2117.8496,13.5469,357.0474);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Trucker Job!");
            }

            if(listitem == 13)
            {
            //Pizza Boy
            SetPlayerCheckpoint(playerid, 2107.5710,-1785.0699,13.3870,289.3750);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Pizza Boy Job!");
            }
        }
    }

    if(dialogid ==  DIALOG_LOCATIONS3)
    {
        if(response)
        {
            if(listitem == 0)
            {
            //24/7
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the 24/7 Market !");
            }

            if(listitem == 1)
            {
            //Clothing
            SetPlayerCheckpoint(playerid, 2244.7283,-1664.9279,15.4766,159.8232);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Binco!");
            }

            if(listitem == 2)
            {
            //Gas Station
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Gas Station!");
            }

            if(listitem == 3)
            {
            //Bank
            SetPlayerCheckpoint(playerid, 1457.0648,-1016.2921,25.8818,355.4666);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Bank !");
            }
        }
   }
   return 1;
}
Fixed
Reply
#9

Thanks for your help guys! Works Great, if you want the finished version you can edit the locations yourself and ill throw it in here:

Код:
//Created by BrianSherbino&Felipe(2013)

#include <a_samp>
#include <zcmd>

#pragma tabsize 0
#define FILTERSCIPT
#define DIALOG_LOCATIONS 0
#define DIALOG_LOCATIONS2 1
#define DIALOG_LOCATIONS3 2
#define COLOR_WHITE 0xFFFFFF00

CMD:search(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_LOCATIONS, DIALOG_STYLE_LIST, "Where would you like to go?", "{00B000}Job Locations \n{00B000}Shop Locations", "OK", "Cancel");
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid ==  DIALOG_LOCATIONS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS2, DIALOG_STYLE_LIST, "These are the Job Opportunities", "{00B000}Detective\n{00B000}Lawyer\n{00B000}Whore\n{00B000}Drug Dealer\n{00B000}Mechanic\n{00B000}Bodyguard\n{00B000}Arms Dealer\n{00B000}Boxer\n{00B000}Drug Smuggler\n{00B000}Taxi Driver\n{00B000}Craftsman\n{00B000}Bartender\n{00B000}Trucker\n{00B000}Pizza Boy", "Search", "Cancel");
            }
            if(listitem == 1)
            {
                ShowPlayerDialog(playerid, DIALOG_LOCATIONS3, DIALOG_STYLE_LIST, "These are Public Stores", "{00B000}24/7\n{00B000}Clothing\n{00B000}Gas Station\n{00B000}Bank", "Search", "Cancel");
            }
        }
    }
    if(dialogid ==  DIALOG_LOCATIONS2)
    {
        if(response)
        {
            if(listitem == 0)
            {
            //Detective
            SetPlayerCheckpoint(playerid, 1554.5299,-1675.7255,16.1953,248.8255);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Detective Job!");
            }

            if(listitem == 1)
            {
            //Lawyer
            SetPlayerCheckpoint(playerid, 1380.8903,-1088.7090,27.3844,81.7233);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Lawyer Job!");
            }

            if(listitem == 2)
            {
            //Whore
            SetPlayerCheckpoint(playerid, 2421.3484,-1219.7549,25.5293,8.2249);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Whore Job!");
            }

            if(listitem == 3)
            {
            //Drug Dealer
            SetPlayerCheckpoint(playerid, 2166.2080,-1675.5850,15.0859,302.2476);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Dealer Job!");
            }

            if(listitem == 4)
            {
            //Mechanic
            SetPlayerCheckpoint(playerid, 161.8671,-25.7934,1.5781,30.9028);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Mechnic Job!");
            }

            if(listitem == 5)
            {
            //Bodyguard
            SetPlayerCheckpoint(playerid, 2226.1838,-1717.9741,13.5141,191.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bodyguard Job!");
            }

            if(listitem == 6)
            {
            //Arms Dealer
            SetPlayerCheckpoint(playerid, 1366.4833,-1275.1704,13.5469,226.5078);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Arms Dealer Job!");
            }

            if(listitem == 7)
            {
            //Boxer
            SetPlayerCheckpoint(playerid, 2229.0835,-1721.3661,13.5616,281.8607);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Boxer Job!");
            }

            if(listitem == 8)
            {
            //Drug Smuggler
            SetPlayerCheckpoint(playerid, 1147.8317,-1202.5688,19.5329,47.7760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Drug Smuggler Job!");
            }

            if(listitem == 9)
            {
            //Taxi Driver
            SetPlayerCheckpoint(playerid, 1741.3721,-1863.6953,13.5748,212.6972);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Taxi Driver Job!");
            }

            if(listitem == 10)
            {
            //Craftsman
            SetPlayerCheckpoint(playerid, 2196.2397,-1973.8779,13.5588,15.0760);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Craftsman Job!");
            }

            //if(listitem == 11)
            //{
            //Bartender
            //SetPlayerCheckpoint(playerid, );
            //SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Bartender Job!");
            //}

            if(listitem == 12)
            {
            //Trucker
            SetPlayerCheckpoint(playerid, 2453.4246,-2117.8496,13.5469,357.0474);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Trucker Job!");
            }

            if(listitem == 13)
            {
            //Pizza Boy
            SetPlayerCheckpoint(playerid, 2107.5710,-1785.0699,13.3870,289.3750);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set on the Pizza Boy Job!");
            }
        }
    }

    if(dialogid ==  DIALOG_LOCATIONS3)
    {
        if(response)
        {
            if(listitem == 0)
            {
            //24/7
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the 24/7 Market !");
            }

            if(listitem == 1)
            {
            //Clothing
            SetPlayerCheckpoint(playerid, 2244.7283,-1664.9279,15.4766,159.8232);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Binco!");
            }

            if(listitem == 2)
            {
            //Gas Station
            SetPlayerCheckpoint(playerid, 1933.4198,-1775.3721,13.3828,195.4314);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Gas Station!");
            }

            if(listitem == 3)
            {
            //Bank
            SetPlayerCheckpoint(playerid, 1457.0648,-1016.2921,25.8818,355.4666);
            SendClientMessage(playerid, COLOR_WHITE, "A checkpoint has been set to the Bank !");
            }
        }
   }
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)