Jump to content
  • 0

Question

Posted

Problema intalnita (descriere): Am creat un DS si am ajuns la momentul in care trebuie sa dai click pe butoanele de la DS. Totul merge perfect pana la butoanele "Testeaza, Anuleaza, Urmatorul". Aceste TD-uri nu functioneaza corect. Daca dau click pe Inapoi / Cumpara imi este trimis un SCM corect, insa la celelalte , de exemplu la "Urmatorul" imi este trimis SCM de la butonul "Inapoi".
Ero(area / rile) / warning-(ul / urile):

 

Textdraw-urile create:

 

	ButonUrmator[playerid] = TextDrawCreate(542.547790, 275.333312, "Urmatorul");
	TextDrawLetterSize(ButonUrmator[playerid], 0.449999, 1.600000);
	TextDrawAlignment(ButonUrmator[playerid], 1);
	TextDrawColor(ButonUrmator[playerid], -1);
	TextDrawSetShadow(ButonUrmator[playerid], 0);
	TextDrawSetOutline(ButonUrmator[playerid], 1);
	TextDrawBackgroundColor(ButonUrmator[playerid], 51);
	TextDrawFont(ButonUrmator[playerid], 3);
	TextDrawSetProportional(ButonUrmator[playerid], 1);
	TextDrawSetSelectable(ButonUrmator[playerid], 1);

	ButonInapoi[playerid] = TextDrawCreate(3.279652, 274.166625, "Inapoi");
	TextDrawLetterSize(ButonInapoi[playerid], 0.449999, 1.600000);
	TextDrawAlignment(ButonInapoi[playerid], 1);
	TextDrawColor(ButonInapoi[playerid], -1);
	TextDrawSetShadow(ButonInapoi[playerid], 0);
	TextDrawSetOutline(ButonInapoi[playerid], 1);
	TextDrawBackgroundColor(ButonInapoi[playerid], 51);
	TextDrawFont(ButonInapoi[playerid], 3);
	TextDrawSetProportional(ButonInapoi[playerid], 1);
	TextDrawSetSelectable(ButonInapoi[playerid], 1);

Comanda [/buyvehicle]:

 

 

      if(strcmp(cmd, "/buyvehicle", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            TogglePlayerControllable(playerid, 0);
            SelectTextDraw(playerid, 0x00FF00FF);
            TextDrawShowForPlayer(playerid, Linie[playerid]);
            TextDrawShowForPlayer(playerid,DealerMasina[playerid]);
            TextDrawShowForPlayer(playerid,DealerPret[playerid]);
            TextDrawShowForPlayer(playerid,ButonAnuleaza[playerid]);
            TextDrawShowForPlayer(playerid,ButonUrmator[playerid]);
            TextDrawShowForPlayer(playerid,ButonInapoi[playerid]);
            TextDrawShowForPlayer(playerid,ButonTesteaza[playerid]);
            TextDrawShowForPlayer(playerid,ButonCumpara[playerid]);
        }
        return 1;
    }

public OnPlayerClickTextDraw:

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(clickedid == ButonInapoi[playerid])
	{
	    SendClientMessage(playerid, COLOR_WHITE, "* Ai dat click pe butonul inapoi.");
	}
	if(clickedid == ButonUrmator[playerid])
	{
	    SendClientMessage(playerid, COLOR_WHITE, "* Ai dat click pe butonul urmator.");
	}
	if(clickedid == ButonCumpara[playerid])
	{
	    SendClientMessage(playerid, COLOR_WHITE, "* Ai dat click pe butonul cumpara.");
	}
	if(clickedid == ButonTesteaza[playerid])
	{
	    SendClientMessage(playerid, COLOR_WHITE, "* Ai dat click pe butonul testeaza.");
	}
	if(clickedid == ButonAnuleaza[playerid])
	{
	    SendClientMessage(playerid, COLOR_WHITE, "* Ai dat click pe butonul anuleaza.");
	}
 	return 1;
}


Liniile de cod / sursa / script-ul(obligatoriu): -
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?:  Da, dar fara succes

7 answers to this question

Recommended Posts

  • 0
Posted

vad ca e corect, + nu are cum sa iti dea ceva incorect la

OnPlayerClickTextDraw

tu trebuie doar sa pui functiile corect la fiecare "buton"

  • 0
Posted (edited)
22 hours ago, Mister said:

Iti da asta pentru ca trebuie sa folosesti textdrawtextsize, ca sa nu se selecteze mai multe in acelasi timp, 

 

Cam ce marime sa pun la text?

Am incercat cu 

TextDrawTextSize(MyTextDraw, 2.0, 3.6);

Si nu s-a modificat nimic.

Edited by MrAndrei
  • 0
Posted (edited)

Nu stiu, depinde de textdraw, incearca pana gasesti combinatia, daca e prea mic nu vei mai putea selecta, daca e prea mare vei putea selecta de oriunde de pe ecran

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
  • 0
Posted (edited)
22 hours ago, Mister said:

Nu stiu, depinde de textdraw, incearca pana gasesti combinatia, daca e prea mic nu vei mai putea selecta, daca e prea mare vei putea selecta de oriunde de pe exran

 

Am folosit a 3-a versiune de Text Font. O sa incerc sa modific textsize-ul si revin.

 

 

EDIT: Am marit TextDrawTextSize pana la 5.0 si nu s-a rezolvat nimic.

EDIT2: Am schimbat variabilele de la ButonInapoi cu cele de la butonUrmator , am schimbat coordonatele si la fel. Cum pot rezolva?

Edited by MrAndrei
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.