PDA

View Full Version : Clickable player textdraws bug?


CrossOv3r
28/03/2015, 05:37 PM
I'm testing RC-3.

- Created some PlayerTextDraws
- Functions not executing.


public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == Textdraw1[playerid] || Textdraw0[playerid] || Textdraw2[playerid] || Textdraw3[playerid] || Textdraw4[playerid] || Textdraw5[playerid])
{
print("Exito");
}
return 1;
}



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"

Vince
28/03/2015, 05:43 PM
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.

CrossOv3r
28/03/2015, 05:57 PM
I use iPleoMax editor to create the textdraws.
The Text size of the textdraw isn't big or too small.

Chris53340
28/03/2015, 06:15 PM
Why do you post here?

Your bug is not related to samp 0.3.7.

Malganys
28/03/2015, 08:22 PM
Why do you post here?

Your bug is not related to samp 0.3.7.

I'm testing RC-3.

plzz

n0minal
28/03/2015, 08:29 PM
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.

http://i.imgur.com/rbiD9Hd.png

Kar
28/03/2015, 08:36 PM
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.

http://forum.sa-mp.com/showthread.php?t=568734

zT KiNgKoNg
28/03/2015, 08:38 PM
Whats up with everyone and this no array thing, you guys need to check your codes properly.

http://forum.sa-mp.com/showthread.php?t=568734


You're completely right Kar.