[Help] Dialog gps problem
#1

How can i make /gps in dialog for houses, biz and sbiz, when i type /gps dialog shows up, and i type id of house, but every house marker show on one place.
It should look like this.
Reply
#2

BUMP!
Reply
#3

24 hour bumps man, and you need to supply some code at least.

Show your creation of the houses, and the dialog response to this dialogue that should show the GPS coords.
Reply
#4

Problems
Код:
if(dialogid == GPS)
{
	if(response)
	{
	PlayerInfo[playerid][pGPSS] = 1;
	{
		if(listitem == 0)
		{
    	    DisablePlayerCheckpoint(playerid);
    	    PlayerInfo[playerid][pGPSS] = 0;
    	    SendClientMessage(playerid, COLOR_GRAD1, "{F81414}Ugasili ste {FFFFFF}GPS!");
    	}
    	if(listitem == 1)
    	{
    	    ShowPlayerDialog(playerid, GPSBeograd, DIALOG_STYLE_LIST, "{3366CC}GPS - Beograd","Policija\nOpstina\nBolnica\nBanka\nTelekom\nJavna Kuhinja\nKupovina Alata\nKupovina Dinamita\nOsiguranje\nMali Oglasi\nCvecara\nMenjacnica\nZlatara\nMehanicari\nVip Baza\nPromoter Baza\nKacige Shop\nGradjevniska Firma\nMc Donals\nAfk Zona\nCrkva\nAuto Skola", "Ok", "");
    	}
    	if(listitem == 2)
    	{
    	    ShowPlayerDialog(playerid, GPSSarajevo, DIALOG_STYLE_LIST, "{3366CC}GPS - Sarajevo","Policija\nOpstina\nBolnica\nBanka\nAuto Skola\nOsiguranje\nJavna Kuhinja\nMenjacnica\nDzamija", "Ok", "");
    	}
    	if(listitem == 3)
    	{
    	    ShowPlayerDialog(playerid, GPSZagreb, DIALOG_STYLE_LIST, "{3366CC}GPS - Zagreb","Policija\nOpstina\nBolnica\nOsiguranje\nMenjacnica\nKatolicka Crkva", "Ok", "");
    	}
    	if(listitem == 4)
    	{
    	    ShowPlayerDialog(playerid, GPSSvigradovi, DIALOG_STYLE_LIST, "{3366CC}GPS - Svi Gradovi","Beograd\nSarajevo\nZagreb\nNis\nNovi Sad\nKragujevac\nLeskovac\nTuzla\nBanja Luka\nBijeljina\nSkoplje\nLjubljana\nSplit\nPodgorica", "Ok", "");
    	}
    	if(listitem == 5)
    	{
    	    ShowPlayerDialog(playerid, GPSOrganizacije, DIALOG_STYLE_LIST, "{3366CC}GPS - Organizacije","Policija\nZandarmerija\nVojska\nSaobracajna Policija\nPolicijska Akademija\nHitna Pomoc\nTaxi\nParking Servis\nNovinari\nHitmani\nRuska Mafia\nLa Cosa Nostra\nYamaguchi\nBallas\nMs-13\nGroove Street Family\nLos Surenos\nGHS\nBajkeri\nPo-1\nPo-2", "Ok", "");
    	}
    	if(listitem == 6)
    	{
    	    ShowPlayerDialog(playerid, GPSPijace, DIALOG_STYLE_LIST, "{3366CC}GPS - Pijace","BG Pijaca\nBG Avio - pijaca\nBG Pijaca camaca/brodova\nSA Pijaca\nSa Pijaca2\nSA Bike pijaca\nZG Pijaca\nZG Pijaca 2", "Ok", "");
    	}
    	if(listitem == 7)
    	{
    	for(new h = 0; h < sizeof(HouseInfo); h++)
    	{
        //new kuca;
		if(sscanf(inputtext,"d",kucaaa))
		{
		ShowPlayerDialog(playerid,GPSKuce,DIALOG_STYLE_INPUT,"{3366CC}GPS - Kuce","{FFFFFF}Unesite ID kuce.","OK","");
		}
		else
		{
		SendClientMessage(playerid, SIVA,"Nepravilno uneseno.");
		return 1;
		}
    	}	//ShowPlayerDialog(playerid,GPSKuce,DIALOG_STYLE_INPUT,"{3366CC}GPS - Kuce","{FFFFFF}Unesite ID kuce.","OK","");
		}
		if(listitem == 8)
		{
			ShowPlayerDialog(playerid,GPSBiznisi,DIALOG_STYLE_INPUT,"{3366CC}GPS - Biznis","{FFFFFF}Unesite ID Biznisa.","OK","");
    	}
    	}
    	}
        return 1;
    }
Код:
if(dialogid == GPSKuce)
{
	if(response)
	{
         for(new h = 0; h < sizeof(HouseInfo); h++)
	 	 {
			if(h == kucaaa)
			{
  			DisablePlayerCheckpoint(playerid);
  			SetPlayerCheckpoint(playerid,HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez],2.0);
			}
			else
			{
			SendClientMessage(playerid, SIVA,"Nije pronadjena kuca sa tim idom.");
			}
  		}
  	}
return 1;
}
Reply
#5

Код:
if(dialogid == GPSKuce)
{
	if(response)
	{
         for(new h = 0; h < sizeof(HouseInfo); h++)
	 	 {
			if(h == inputtext)// This is what I've changed. That is, if inputtext will hand back the number you typed in that dialog. (You may need to check the value and that it is indeed an integer
			{
  			DisablePlayerCheckpoint(playerid);
  			SetPlayerCheckpoint(playerid,HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez],2.0);
			}
			else
			{
			SendClientMessage(playerid, SIVA,"Nije pronadjena kuca sa tim idom.");
			}
  		}
  	}
return 1;
}
Reply
#6

Код:
error 033: array must be indexed (variable "inputtext")
Код:
if(dialogid == GPSKuce)
{
	if(response)
	{
         for(new h = 0; h < sizeof(HouseInfo); h++)
	 	 {
			if(h == inputtext)// This is what I've changed. That is, if inputtext will hand back the number you typed in that dialog. (You may need to check the value and that it is indeed an integer
			{
  			DisablePlayerCheckpoint(playerid);
  			SetPlayerCheckpoint(playerid,HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez],2.0);
			}
			else
			{
			SendClientMessage(playerid, SIVA,"Nije pronadjena kuca sa tim idom.");
			}
  		}
  	}
return 1;
}
Reply
#7

Try
Код:
inputtext[0]
You should also mind out, because this won't have error checking at all. So someone could put letters into the inputbox and it could have unexpected results.

Should do a check if it's between 0 or 1 (depending on where houseIDs start) to MAX_HOUSES style, denying all the rest saying invalid ID input to the player.
Reply
#8

bump?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)