Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: k0c1c. poslato Avgust 11, 2021, 18:59:09 POSLE PODNE

Naslov: TD probelm
Poruka od: k0c1c. poslato Avgust 11, 2021, 18:59:09 POSLE PODNE
Problem(error/warning):Sredio sam full register sistem i dodao sam PlayerTextDrawTextSize zbog boljeg selektovanja kada sam to dodao td uopste nece da se selektuje a sve sam lepo podesio
Deo skripte:[pawn]PlayerTextDrawTextSize(playerid, RegisterTD[playerid][11], 30.000000, 30.000000);[/pawn]
Naslov: Odg: TD probelm
Poruka od: Maxwellâ„¢ poslato Avgust 11, 2021, 19:56:15 POSLE PODNE
[pawn]PlayerTextDrawSetSelectable(playerid, RegisterTD[playerid][11], 1);[/pawn]
Dodaj ovo
Naslov: Odg: TD probelm
Poruka od: Bit Frosty poslato Avgust 11, 2021, 20:32:42 POSLE PODNE
Da napomenem jednu jako bitnu stvar. Textdraw sistem u samp-u nema veze s mozgom, i jako je jeben sto se tice logike (nema je).
Recimo pocetne koordinate su gore levo, ali ako koristis alignment right onda su u stvari gore desno iz nekog razloga.
Samo cu da quote sa open.mp wiki (sto je u stvari copy/paste sa starog sa-mp wiki).


The x and y have different meanings with different TextDrawAlignment values: 1 (left): they are the right-most corner of the box, absolute coordinates. 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box. 3 (right): the x and y are the coordinates of the left-most corner of the box

Using font type 4 (sprite) and 5 (model preview) converts X and Y of this function from corner coordinates to WIDTH and HEIGHT (offsets). The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate). This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not.


Kao sto vidis, X i Y coordinate menjaju svoje znacenje od tipa alignment tipa. Plus da ne pricamo o gluposti 640x480 pixela tabeli...
Naslov: Odg: TD probelm
Poruka od: k0c1c. poslato Avgust 12, 2021, 02:21:18 PRE PODNE
Citat: Maxwellâ,,¢ poslato Avgust 11, 2021, 19:56:15 POSLE PODNE
[pawn]PlayerTextDrawSetSelectable(playerid, RegisterTD[playerid][11], 1);[/pawn]
Dodaj ovo
ima vec to
Naslov: Odg: TD probelm
Poruka od: #bokenzi poslato Avgust 13, 2021, 12:00:14 POSLE PODNE
 Sjeban je td textsize pogotovo ako koristis onaj drugi font, probaj textsize povecati npr ovako:

[pawn]PlayerTextDrawTextSize(playerid, RegisterTD[playerid][11], 320.000000, 30.000000);[/pawn]

I onda ako radi postepeno smanjivati.