SA-MP Forums Archive
Clickable player textdraws bug? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Clickable player textdraws bug? (/showthread.php?tid=569162)



Clickable player textdraws bug? - CrossOv3r - 28.03.2015

I'm testing RC-3.

- Created some PlayerTextDraws
- Functions not executing.

pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == Textdraw1[playerid] || Textdraw0[playerid] || Textdraw2[playerid] || Textdraw3[playerid] || Textdraw4[playerid] || Textdraw5[playerid])
    {
        print("Exito");
    }
    return 1;
}
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(PlayerInfo[playerid][pPrimeraVezJugando] == 1)
    {
        //REGISTRO DE CARACTER
        PlayerTextDrawShow(playerid, Textdraw0[playerid]);
        PlayerTextDrawShow(playerid, Textdraw1[playerid]);
        PlayerTextDrawShow(playerid, Textdraw2[playerid]);
        PlayerTextDrawShow(playerid, Textdraw3[playerid]);
        PlayerTextDrawShow(playerid, Textdraw4[playerid]);
        PlayerTextDrawShow(playerid, Textdraw5[playerid]);
        PlayerTextDrawShow(playerid, Textdraw6[playerid]);
        PlayerTextDrawShow(playerid, Textdraw7[playerid]);
        PlayerTextDrawShow(playerid, Textdraw8[playerid]);

        SelectTextDraw(playerid, 0xFF4040AA);
    }
    return 1;
}
Hover effect not applying as well....
PS: And yes.. they are "selectable"


Re: Clickable player textdraws bug? - Vince - 28.03.2015

Have you used this function before and are you familiar with its workings? Nine times out of ten clickable textdraws aren't working because the values in TextDrawTextSize are invalid. Read the wiki.


Re: Clickable player textdraws bug? - CrossOv3r - 28.03.2015

I use iPleoMax editor to create the textdraws.
The Text size of the textdraw isn't big or too small.


Re : Clickable player textdraws bug? - Chris53340 - 28.03.2015

Why do you post here?

Your bug is not related to samp 0.3.7.



Respuesta: Re : Clickable player textdraws bug? - Malganys - 28.03.2015

Quote:
Originally Posted by Chris53340
Посмотреть сообщение
Why do you post here?

Your bug is not related to samp 0.3.7.
Quote:
Originally Posted by CrossOv3r
Посмотреть сообщение
I'm testing RC-3.
plzz


Re: Clickable player textdraws bug? - n0minal - 28.03.2015

1- Why are you using PlayerTextDraws with array index?

Textdraw1[playerid], it makes no sense, why use array for a perplayered function?

if youre declaring new PlayerText:Textdraw1, sa-mp automatically index it for all players, thats why you have a playerid parameter for every PlayerTextDraws function.

2- PlayerTextDraws hovering and clicking seems perfect for me, i have my own inventory system and i'm using RC3-3 and works perfectly, read wiki stuff about PlayerTextDrawTextSize for clickable texts.




Re: Clickable player textdraws bug? - Kar - 28.03.2015

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
1- Why are you using PlayerTextDraws with array index?

Textdraw1[playerid], it makes no sense, why use array for a perplayered function?

if youre declaring new PlayerText:Textdraw1, sa-mp automatically index it for all players, thats why you have a playerid parameter for every PlayerTextDraws function.

2- PlayerTextDraws hovering and clicking seems perfect for me, i have my own inventory system and i'm using RC3-3 and works perfectly, read wiki stuff about PlayerTextDrawTextSize for clickable texts.
Whats up with everyone and this no array thing, you guys need to check your codes properly.

https://sampforum.blast.hk/showthread.php?tid=568734


Re: Clickable player textdraws bug? - zT KiNgKoNg - 28.03.2015

Quote:
Originally Posted by Kar
Посмотреть сообщение
Whats up with everyone and this no array thing, you guys need to check your codes properly.

https://sampforum.blast.hk/showthread.php?tid=568734
You're completely right Kar.