PlayerTextDrawSetSelectable Issue -
Kyle - 29.05.2012
Hi, I use this code and that for clicking textdraws but it's giving off false data:
Код:
for(new k = 0; k < MAX_ROWS; k++)
{
Position = rc + (k * 9);
bxOptions[playerid][k] = CreatePlayerTextDraw(playerid, 14.000000, Position, " ");
PlayerTextDrawBackgroundColor(playerid, bxOptions[playerid][k], 255);
PlayerTextDrawFont(playerid, bxOptions[playerid][k], 1);
PlayerTextDrawLetterSize(playerid, bxOptions[playerid][k], 0.23, 0.93);
PlayerTextDrawColor(playerid, bxOptions[playerid][k], -1);
PlayerTextDrawSetOutline(playerid, bxOptions[playerid][k], 1);
PlayerTextDrawSetProportional(playerid, bxOptions[playerid][k], 1);
PlayerTextDrawSetSelectable(playerid, bxOptions[playerid][k], 1);
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid != INVALID_TEXT_DRAW_PLAYER)
{
for(new k = 0; k < MAX_ROWS; k++)
{
if(playertextid == bxOptions[playerid][k])
{
if(k-1 <= 0) continue;
format(msg, 5, "%d", k-1);
CallRemoteFunction("OnPlayerText", "is", playerid, msg);
break;
}
}
}
return 1;
}
[ame]http://www.youtube.com/watch?v=cR7YYvdxLQg[/ame]
All of the other numbers work apart from option 5, water. When I click water it calls donut but all the others are fine.
Re: PlayerTextDrawSetSelectable Issue -
ViniBorn - 29.05.2012
Try to change your TextDrawTextSize
pawn Код:
TextDrawTextSize(bxOptions[playerid][k], 30.0, 10.0);
// Clickable area
// 30.0 = Horizontal
// 10.0 = Vertical
Re: PlayerTextDrawSetSelectable Issue -
Kyle - 29.05.2012
I have updated the main post: Please re-read as I've changed it also video is different.
Re: PlayerTextDrawSetSelectable Issue -
ViniBorn - 29.05.2012
The problem is only with the option 5 ?
Re: PlayerTextDrawSetSelectable Issue -
Kyle - 29.05.2012
If I click option 5 or 6 it returns option 4. But all the other options 1 - 4 work.
Re: PlayerTextDrawSetSelectable Issue -
ViniBorn - 29.05.2012
MAX_ROWS = 6 ?
Re: PlayerTextDrawSetSelectable Issue -
mati233 - 29.05.2012
Quote:
Originally Posted by Viniborn
MAX_ROWS = 6 ?
|
If it was not 6, the textdraw should not display the 6, so I think that's not the problem...
Re: PlayerTextDrawSetSelectable Issue -
MP2 - 29.05.2012
The clickable areas are fucked up on different resolutions. Really needs fixing..
Re: PlayerTextDrawSetSelectable Issue -
Kyle - 30.05.2012
Quote:
Originally Posted by MP2
The clickable areas are fucked up on different resolutions. Really needs fixing..
|
Is there no way to fix it?