I'm stuck at this...totally
#1

So, I'm working on a script of mine, let's say, we add 3 items in my dialog.

Item1
Item2
Item3

Let's say I delete Item2, then my dialog becomes:

Item1
Item3

I can select Item1, but when I select item3 it won't select.

A good example is exactly what I need is in Zamaroht's textdraw editor, where you can delete and select created textdraws with ease.. I'm really stuck at this, I almost did like what Zamaroht did but I simply can't make it work! I just won't select the next textdraw.

Here is some pieces of code that might help you guys help me?


This code I use when selecting my textdraw.
pawn Код:
new id;
for(new t=-1; t < MAX_TEXTDRAWS; t ++)
{
    if(td_i[t][created])
    {
        if(id == listitem)
        {
            td_editing = t;
            SendClientMessageEx(playerid, -1, "Selected sprite id {FF0000}%d{FFFFFF}.", td_editing);
            break;
        }
    }
}

And this is the code I have when deleting a textdraw.

pawn Код:
if(!response)
    return OnPlayerCommandText(playerid, #/txd);

OnPlayerCommandText(playerid, "/txd");
TextDrawHideForAll(td_i[td_editing][td]);

td_i[td_editing][created] = 0;
td_i[td_editing][td_y] = 0.0;
td_i[td_editing][td_x] = 0.0;
td_i[td_editing][td_height] = 0.0;
td_i[td_editing][td_width] = 0.0;
td_i[td_editing][td_color] = RGB(HexToInt(#FF), HexToInt(#FF), HexToInt(#FF), HexToInt(#FF));
format(td_i[td_editing][td_name],30, " ");
td_editing = -1;
Here's an image to explain better:

Maybe you understood me somehow
Reply


Messages In This Thread
I'm stuck at this...totally - by Zh3r0 - 17.10.2011, 21:03
Re: I'm stuck at this...totally - by DiDok - 17.10.2011, 21:17
Re: I'm stuck at this...totally - by JaTochNietDan - 17.10.2011, 21:27
Re: I'm stuck at this...totally - by Zh3r0 - 18.10.2011, 03:58
Re: I'm stuck at this...totally - by DiDok - 18.10.2011, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)