Dialog help!
#1

Hi!

I have a problem...I have a CO and when u r buying a car u buy it with enter or F and choose a car with left & right arrow! Now i want to remowe that and make it to buy a car in a dialog! If you can't make that nobody can!

So i want this to have in DIALOG! That when you type /dealership you get a dialog with listed cars and prices and when you choose a car just klick and you buyed it!

Код:
public CarSelect(playerid)
{
if(IsPlayerConnected(playerid))
	{
	if(BuyCar[playerid] == true)
		{
		new string[128];
		new ime[24];
	    new Keys, ud, lr;
	    GetPlayerKeys(playerid, Keys, ud, lr);
	    	GetPlayerName(playerid, ime, sizeof(ime));
			if(lr > 0)
				{
					AutoModel++;
					if(AutoModel > NUMBER_OFSELLED_MODELS-1) {AutoModel = 0;}
					DestroyVehicle(IzlozbenoVozilo);
					IzlozbenoVozilo = CreateVehicle(Modeli_vozila[AutoModel][0], 1129.2640,-1454.3809,15.7969,181.4425, Mboja[0], Mboja[1], 30000);
					format(string,sizeof(string),"~h~~h~~b~Cjena: %d~n~~n~~h~~h~~y~< ~g~dalje ~h~~h~~y~>",Modeli_vozila[AutoModel][1]);
					TextDrawSetString(MotoTextDraw[playerid],string);
				}
				else if(lr < 0)
				{
					AutoModel--;
					if (AutoModel < 0) {AutoModel = BROJ_PRODAJNIH_MODELA-1;}
					DestroyVehicle(IzlozbenoVozilo);
					IzlozbenoVozilo = CreateVehicle(Modeli_vozila[AutoModel][0], 1129.2640,-1454.3809,15.7969,181.4425, Mboja[0], Mboja[1], 30000);
					format(string,sizeof(string),"~h~~h~~b~Cjena: %d~n~~n~~h~~h~~y~< ~g~prethodno ~h~~h~~y~>",Modeli_vozila[AutoModel][1]);
					TextDrawSetString(MotoTextDraw[playerid],string);
				}
				else if(Keys & KEY_SECONDARY_ATTACK)
				{
				if(PlayerInfo[playerid][pCar1] == 255 || PlayerInfo[playerid][pCar2] == 255 || PlayerInfo[playerid][pCar1] == 255 && PlayerInfo[playerid][pCar2] == 255)
				{
				if(GetPlayerMoney(playerid) >= Modeli_vozila[AutoModel][1])
				{
				for(new i = 1; i < sizeof(Vozila); i++ )
					{
					if(Vozila[i][mX] == 0 && Vozila[i][mY] == 0 && Vozila[i][mZ] == 0 && Vozila[i][mKoristen] == 0)
					{
					// vozilo RESET KLJUCA
				PlayerInfo[playerid][pCar1] = GetMyCar1(playerid); //auto 1
				PlayerInfo[playerid][pCar2] = GetMyCar2(playerid); //auto 2

				if(PlayerInfo[playerid][pCar1] == 255 && PlayerInfo[playerid][pCar2] == 255)
				{PlayerInfo[playerid][pCar1] = i;
				Vozila[i][mBroj] = 1;}
    			else if(PlayerInfo[playerid][pCar2] == 255 && PlayerInfo[playerid][pCar1] != 255)
			 	{PlayerInfo[playerid][pCar2] = i;
				 Vozila[i][mBroj] = 2;}
	    		 else if(PlayerInfo[playerid][pCar2] != 255 && PlayerInfo[playerid][pCar1] == 255)
				 {PlayerInfo[playerid][pCar1] = i;
				 Vozila[i][mBroj] = 1;}
				 PlayerInfo[playerid][pMainKey] = i;

				SendClientMessage(playerid, COLOR_GREEN, "Kupili ste vozilo! Za pomoc koriste /vehhelp !");
				GivePlayerMoney(playerid,-Modeli_vozila[AutoModel][1]);
				Vozila[i][mKoristen] = 1;
				Vozila[i][mModel] = Modeli_vozila[AutoModel][0];
				Vozila[i][mX] = 1106.5691;
				Vozila[i][mY] = -1428.4077;
				Vozila[i][mZ] = 16.0969;
				Vozila[i][mA] = 265.0799;
				Vozila[i][mpBoja] = Mboja[0];
				Vozila[i][mdBoja] = Mboja[1];
				Vozila[i][mZakljucan] = 0;
				strmid(Vozila[i][mVlasnik], ime, 0, strlen(ime), 999);
          		TogglePlayerControllable(playerid, 1);
          		Vozila[i][mOsobno] = CreateVehicle(Modeli_vozila[AutoModel][0], Vozila[i][mX],Vozila[i][mY],Vozila[i][mZ],Vozila[i][mA], Vozila[i][mpBoja], Vozila[i][mdBoja], 30000);
          		KillTimer(Mtimer[playerid]);
          		KupnjaVozila[playerid] = false;
          		HMotoText(playerid);
          		SetCameraBehindPlayer(playerid);
          		UpdateVozilo(i);
          		break;
          		    }
          		   }
          		}
          		else
          		{
          		format(string,sizeof(string),"Nemas dosta novaca! Ovo vozilo stoji %d dolara!",Modeli_vozila[AutoModel][1]);
				SendClientMessage(playerid,COLOR_LIGHTRED,string);
				}
	    		}
	    		else
	    		{
	    		SendClientMessage(playerid,COLOR_LIGHTRED,"Vec imate vozilo!");
	    		}
	    		}
	    		else if (Keys &  KEY_HANDBRAKE || Keys &  KEY_JUMP )
	    		{
	    		KillTimer(Mtimer[playerid]);
	    		TogglePlayerControllable(playerid, 1);
	    		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odustali ste od kupnje vaseg vozila...");
	    		KupnjaVozila[playerid] = false;
    			HMotoText(playerid);
    			SetCameraBehindPlayer(playerid);
	    		}
			}
		}
	return 1;
}
Reply
#2

Use DIALOG_STYLE_LIST
thats all i can tell, lazy to script all.
Reply
#3

Quote:
Originally Posted by 0utLaW_
Посмотреть сообщение
Use DIALOG_STYLE_LIST
thats all i can tell, lazy to script all.
Yes man but I'm a beginer in pawno and i really need help for this :/ PLESAE do it for me
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
No-one will just do it for you unless you pay them, we are here to help you learn how to script, not script for you. So then the question becomes, what have you tried already? What other examples and bits of documentation have you looked at already to show you the basics of what to do? If, having looked at those bits and pieces, you are still confused about something, what is that thing you are stuck on? That's where we can help out and point you in the right direction, possibly by better explaining some part of existing code. Not just doing it all for you - then you don't learn anything from the process and will need us to just do the next bit of code for you as well, and the bit after etc because you never learn anything from it.

On the other hand, you could just hire a scripter (and no, not me).
Look, I know some basic things I made my own Login/Register system over a tutorial edited thousands of fs and commands and other stuff but I really don't know how to make a dialog for this....DIALOG_STYLE_LIST that way to hard for me to understand i can look on samp wikki but i tryed a milion of times to make it but i dont know what pieces to remove frow this selecter list to make it for a dialog! I'm sorry for trying to get help! But can you at least explain me what to remove from that script i puted in code! To make it work in dialog!
Reply
#5

Quote:
Originally Posted by xXx:FireBlade
Посмотреть сообщение
Yes man but I'm a beginer in pawno and i really need help for this :/ PLESAE do it for me
No

If you dont know how use DIALOG_STYLE_LIST and other download "Dialog based carspawner" and see the script, you get a figure in mind that how to script and make you self.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)