I need help!GPS FS
#1

Hello Com,
My problem is that i will put the Gps FS into my server but if the first dialog will show then i choose one of the citys and then the 2nd Dialogue will not show
here is the link
https://sampforum.blast.hk/showthread.php?tid=146629

Код:
#include <a_samp>

#define DIALOGID 1337
#define COLOR_GREY			0xAFAFAFAA
#define COLOR_RED			0xA10000AA

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/gps", cmdtext, true, 10) == 0)
	{
	    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	 	{
			ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, ".:[ GPS System ]:.", "Los Santos\nSan Fierro\nLas Venturas", "Select", "Cancel");
		}
		else
		{
		    DisablePlayerCheckpoint(playerid);
		    SendClientMessage(playerid, COLOR_GREY, "» You can only use GPS in vehicle!");
		}
		return 1;
	}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOGID)
	{
		if(response)
		{
			if(listitem == 0) // Los Santos
			{
				ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "GPS - Los Santos", "San Andreas News\nMarket Station\nUnity Station\nPolice Dept\nVerona Mall\nJefferson\nFire Dept\nAlhambra\nCity Hall\nHospital\nAirport\nGrotti\nBank\nGym\nFBI\nBack", "Select", "Cancel");
			}
			if(listitem == 1) // San Fierro
			{
				ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "GPS - San Fierro", "Wheel Arch Angels\nLicense Center\nTrain Station\nOtto's Autos\nPolice Dept\nFire Dept\nWang Cars\nSupa Save\nCity Hall\nHospital\nAirport\nBank\nFBI\nBack", "Select", "Cancel");
			}
			if(listitem == 2) // Las Venturas
			{
				ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "GPS - Las Venturas", "Four Dragons\nPirate Ship\nPolice Dept\nRock Hotel\nAuto Bahn\nFire Dept\nCity Hall\nHospital\nAirport\nSchool\nDocks\nMall\nFBI\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}

	if(dialogid == DIALOGID+1) // Los Santos
	{
		if(response)
		{
			if(listitem == 0)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1592.7197,-1314.8453,17.4766, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ San Andreas News");
			}
			if(listitem == 1)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 807.5717,-1333.6436,13.5469, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Market Station");
			}
			if(listitem == 2)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1742.9586,-1860.5750,13.5786, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Unity Station");
			}
			if(listitem == 3)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1540.9951,-1675.3879,13.5517, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Police Dept");
			}
			if(listitem == 4)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1126.2640,-1411.7146,13.6033, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Verona Mall");
			}
			if(listitem == 5)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2209.5659,-1135.8253,25.7969, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Jefferson");
			}
			if(listitem == 6)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1745.6860,-1447.1727,13.5391, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Fire Dept");
			}
			if(listitem == 7)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1828.1398,-1682.3046,13.5469, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Alhambra");
			}
			if(listitem == 8)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1480.9709,-1739.5295,13.5469, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ City Hall");
			}
			if(listitem == 9)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1189.2349,-1323.5713,13.5668, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Hospital");
			}
            if(listitem == 10)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1629.7604,-2324.9978,13.5469, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Airport");
			}
            if(listitem == 11)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 565.7337,-1246.5773,17.3518, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Grotti");
			}
            if(listitem == 12)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1460.6097,-1025.5023,23.8281, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ Bank");
			}
            if(listitem == 13)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2225.8713,-1726.6396,13.5532, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ GYM");
			}
            if(listitem == 14)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1519.0610,-1447.2101,13.5391, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LS ~ FBI");
			}
            if(listitem == 15)
			{
				DisablePlayerCheckpoint(playerid);
				ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, ".:[ GPS System ]:.", "Los Santos\nSan Fierro\nLas Venturas", "Select", "Cancel");
			}
		}
		return 1;
	}
	
	if(dialogid == DIALOGID+2) // San Fierro
	{
		if(response)
		{
			if(listitem == 0)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2711.1560,217.5963,4.1938, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Wheel Arch Angels");
			}
			if(listitem == 1)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2026.7440,-94.3292,35.1641, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ License Center");
			}
			if(listitem == 2)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -1986.2491,138.1498,27.6875, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Train Station");
			}
			if(listitem == 3)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -1631.5974,1198.5522,7.1875, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Otto's Autos");
			}
			if(listitem == 4)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -1605.8099,723.1791,12.0236, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Police Dept");
			}
			if(listitem == 5)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2025.4030,67.1354,28.4671, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Fire Dept");
			}
			if(listitem == 6)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -1977.9059,288.3777,35.1719, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Wang Cars");
			}
			if(listitem == 7)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2442.6270,748.2835,35.1719, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Supa Save");
			}
			if(listitem == 8)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2755.3293,375.1659,4.3360, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ City Hall");
			}
			if(listitem == 9)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2655.1523,632.2845,14.4531, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Hospital");
			}
            if(listitem == 10)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -1420.8574,-296.7662,14.1484, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Airport");
			}
            if(listitem == 11)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -1520.0027,920.7176,7.1875, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ Bank");
			}
            if(listitem == 12)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, -2444.8899,487.0674,30.0742, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: SF ~ FBI");
			}
            if(listitem == 13)
			{
				DisablePlayerCheckpoint(playerid);
				ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, ".:[ GPS System ]:.", "Los Santos\nSan Fierro\nLas Venturas", "Select", "Cancel");
			}
		}
		return 1;
	}
	
	if(dialogid == DIALOGID+3) // Las Venturas
	{
		if(response)
		{
			if(listitem == 0)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2036.5930,1007.7439,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Four Dragons");
			}
			if(listitem == 1)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2036.4658,1545.3075,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Pirate Ship");
			}
			if(listitem == 2)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2289.5500,2418.9866,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Police Department");
			}
			if(listitem == 3)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2631.8552,2349.7903,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Rock Hotel");
			}
			if(listitem == 4)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2171.0364,1411.2937,11.0625, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Auto Bahn");
			}
			if(listitem == 5)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1779.4283,2059.1326,10.9766, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Fire Department");
			}
			if(listitem == 6)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2421.2566,1123.7965,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ City Hall");
			}
			if(listitem == 7)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1607.2969,1822.4591,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Hospital");
			}
			if(listitem == 8)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1709.1046,1453.6711,10.8168, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Airport");
			}
			if(listitem == 9)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 1024.2366,1148.6658,10.7588, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ School");
			}
            if(listitem == 10)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2295.1616,626.0677,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Docks");
			}
            if(listitem == 11)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2913.5112,2396.2637,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ Mall");
			}
            if(listitem == 12)
			{
				DisablePlayerCheckpoint(playerid);
			 	SetPlayerCheckpoint(playerid, 2433.5288,2376.6196,10.8203, 3.0);
			 	SendClientMessage(playerid, COLOR_RED, "» Destination Selected: LV ~ FBI");
			}
            if(listitem == 13)
			{
				DisablePlayerCheckpoint(playerid);
				ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, ".:[ GPS System ]:.", "Los Santos\nSan Fierro\nLas Venturas", "Select", "Cancel");
			}
		}
		return 1;
	}
	
	return 0;
 }
 
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == 2)
	{
		SendClientMessage(playerid, COLOR_GREY, "» Type /gps to use GPS system.");
	}
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	SendClientMessage(playerid, COLOR_RED, "» You arrived destination..");
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Reply
#2

Post the code of the filterscript instead please, there seems to be no download link in the filterscript. Probably something wrong with a "if(response)" somewhere.
Reply
#3

#Code added
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)