01.04.2012, 22:01
(
Последний раз редактировалось Manuel_P; 01.04.2012 в 23:18.
Причина: solved 2/3 problems
)
Textdraw problem 1: SOLVED (TextDrawTextSize had to be used)
When I have numerous textdraws underneath each other in a menu-like order, and I make them all selectable with TextDrawSetSelectable(textdrawID, 1), and I select the bottom one, the ones above it are selected too when I hover over it.
For example:
Textdraw1 -> sendmsg '1'
Textdraw2 -> sendmsg '2'
Textdraw3 -> etc
Textdraw4
When I select textdraw1, only that one is selected. When I select textdraw2, both textdraw1 and 2 are selected. When I select textdraw3, textdraw1, 2, and 3 are selected, etc. I gave them simple sendclientmessage functions to check whether the server clicks on the right one, and it does. When I click on textdraw1, I get the msg '1', when I click on textdraw2, I get the msg '2', so the server sees the difference between the textdraws, but it still selects them all. I initialized every textdraw, so the problem can't be there.
Sort of the same thing happened with sprites. I had 9 16x16 sprites in a 3x3 configuration(plenty of space between them)
1 2 3
4 5 6
7 8 9
When I'd hover over 6, 4 gets selected too (not 5). When I hover over 8, 4 6 7 8 and 9 are selected as well. If I'd click on 7 or 8, textdraw 9 would get activated.
What the hell is going on and how can I fix this? xD
NOTE: My mouse can be on the other side of the screen, but when I get to the textdraw's height, it gets selected as well, as if there's an invisible button stretching out from 1 side of the screen to the other.
Textdraw problem 2: SOLVED (can't define the same sprite twice)
I have the LD_BEAT:left sprite in the script, but instead of showing the actual arrow txd of LD_BEAT:left, it shows the actual text 'LD BEAT:left". This is the code I use:
The weird thing is that when I use this in the standard grandlarc gamemode, it shows up like it should, as an arrow. But when I use it in my FS, it shows up as text. How do I fix that?
Textdraw problem 3: SOLVED (Forgot a simple TextDrawShowForPlayer, d'oh!)
Somewhat similar to the first problem, but not quite:
I have 10 textdraws lined up as follows:
I have no idea what I'm doing wrong, or what I'm missing.
PS: All the textdraws in my problems are aligned to the center, but I tried adjusting it to either right, or left, but to no avail.
When I have numerous textdraws underneath each other in a menu-like order, and I make them all selectable with TextDrawSetSelectable(textdrawID, 1), and I select the bottom one, the ones above it are selected too when I hover over it.
For example:
Textdraw1 -> sendmsg '1'
Textdraw2 -> sendmsg '2'
Textdraw3 -> etc
Textdraw4
When I select textdraw1, only that one is selected. When I select textdraw2, both textdraw1 and 2 are selected. When I select textdraw3, textdraw1, 2, and 3 are selected, etc. I gave them simple sendclientmessage functions to check whether the server clicks on the right one, and it does. When I click on textdraw1, I get the msg '1', when I click on textdraw2, I get the msg '2', so the server sees the difference between the textdraws, but it still selects them all. I initialized every textdraw, so the problem can't be there.
Sort of the same thing happened with sprites. I had 9 16x16 sprites in a 3x3 configuration(plenty of space between them)
1 2 3
4 5 6
7 8 9
When I'd hover over 6, 4 gets selected too (not 5). When I hover over 8, 4 6 7 8 and 9 are selected as well. If I'd click on 7 or 8, textdraw 9 would get activated.
What the hell is going on and how can I fix this? xD
NOTE: My mouse can be on the other side of the screen, but when I get to the textdraw's height, it gets selected as well, as if there's an invisible button stretching out from 1 side of the screen to the other.
Textdraw problem 2: SOLVED (can't define the same sprite twice)
I have the LD_BEAT:left sprite in the script, but instead of showing the actual arrow txd of LD_BEAT:left, it shows the actual text 'LD BEAT:left". This is the code I use:
Код:
left= TextDrawCreate(271.000, 308.500, "LD_BEAT:left"); TextDrawFont(left, 4); TextDrawTextSize(left, 10.000, 10.000); TextDrawColor(left, 0x000000FF);
Textdraw problem 3: SOLVED (Forgot a simple TextDrawShowForPlayer, d'oh!)
Somewhat similar to the first problem, but not quite:
I have 10 textdraws lined up as follows:
Textdraw1Textdraw5 Textdraw6
Textdraw2
Textdraw3
Textdraw4
Textdraw7Textdraw8 Textdraw9
Textdraw10They're all selectable, except for textdraws 4 and 7. Textdraws5,6,8, and 9 have backgrounds, so they look more like buttons. Before I made them selectable they showed up just fine, without any problems. But as soon as I used TextDrawSetSelectable, Textdraws4 and 7 dissappeared, and textdraws5,6,8 and 9 weren't selectable at all. When I hovered over texdraw2,3,or 10, the textdraws above were selected as well, like the first problem I described (but not the button textdraws, they simply can't be selected, and not the textdraws4 and 7 because they just dissappeared.
I have no idea what I'm doing wrong, or what I'm missing.
PS: All the textdraws in my problems are aligned to the center, but I tried adjusting it to either right, or left, but to no avail.