Textdraw Background Transparency? -
Shoulen - 24.02.2014
Hi,
So I have this:
pawn Код:
PocketSlot[playerid][i] = CreatePlayerTextDraw(playerid, 180.000000, 390.000000, "_");
PlayerTextDrawFont(playerid, PocketSlot[playerid][i], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, PocketSlot[playerid][i], 1);
PlayerTextDrawBoxColor(playerid, PocketSlot[playerid][i], 0x00000096);
PlayerTextDrawTextSize(playerid, PocketSlot[playerid][i], 50.000000, 50.000000);
PlayerTextDrawSetPreviewModel(playerid, PocketSlot[playerid][i], 2601);
PlayerTextDrawSetPreviewRot(playerid, PocketSlot[playerid][i], -10.0, 0.0, -20.0, 1.0);
PlayerTextDrawSetSelectable(playerid, PocketSlot[playerid][i], 0);
And for some reason, no matter what I set the colour to, it is always a big black square. I even tried setting it to a blue square and it still appeared as a black one. Ideally I want a slightly transparent black square. But I don't want to just fix this problem, I want to understand where I am going wrong.
I hope this makes sense.
Warm Regards
Matt
Respuesta: Textdraw Background Transparency? -
OTACON - 24.02.2014
https://sampwiki.blast.hk/wiki/PlayerTextDrawColor
PlayerTextDrawColor in 0
Re: Textdraw Background Transparency? -
AlonzoTorres - 24.02.2014
Try,
pawn Код:
PlayerTextDrawBoxColor(playerid, PocketSlot[playerid], 102);
Re: Textdraw Background Transparency? -
Shoulen - 24.02.2014
Hello,
Thank for your prompt responses, however, it did not solve the problem, it did make the block become transparent when I did this code:
pawn Код:
PocketSlot[playerid][i] = CreatePlayerTextDraw(playerid, 180.000000, 390.000000, "_");
PlayerTextDrawFont(playerid, PocketSlot[playerid][i], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, PocketSlot[playerid][i], 1);
PlayerTextDrawTextSize(playerid, PocketSlot[playerid][i], 50.000000, 50.000000);
PlayerTextDrawBoxColor(playerid, PocketSlot[playerid][i], 0x000000);
PlayerTextDrawColor(playerid, PocketSlot[playerid][i], 150);
PlayerTextDrawSetPreviewModel(playerid, PocketSlot[playerid][i], 2601);
PlayerTextDrawSetPreviewRot(playerid, PocketSlot[playerid][i], -10.0, 0.0, -20.0, 1.0);
PlayerTextDrawSetSelectable(playerid, PocketSlot[playerid][i], 0);
But as much as it made the block become transparent, it hid the entire Model (Object 2601) so it's basically a blank block.
Re: Textdraw Background Transparency? -
AlonzoTorres - 24.02.2014
Nvm.
Re: Textdraw Background Transparency? -
Shoulen - 24.02.2014
No, I want it to be slightly opaque (which it is) but the object disappears when I make it so.
Re: Textdraw Background Transparency? -
AlonzoTorres - 24.02.2014
Quote:
Originally Posted by Shoulen
No, I want it to be slightly opaque (which it is) but the object disappears when I make it so.
|
Remove,
pawn Код:
PlayerTextDrawColor(playerid, PocketSlot[playerid][i], 150);
Re: Textdraw Background Transparency? -
Shoulen - 24.02.2014
Quote:
Originally Posted by AlonzoTorres
Remove,
pawn Код:
PlayerTextDrawColor(playerid, PocketSlot[playerid][i], 150);
|
It just made it black with no opacity, the object is there.