Textdraw Help.
#1

Hey Guys! i Need help making Textdraws Selectable Like 1,2,3 etc

PHP код:
Commands1 TextDrawCreate(23.058822180.250076"Commands");
TextDrawLetterSize(Commands10.2631750.952498);
TextDrawAlignment(Commands11);
TextDrawColor(Commands1, -1);
TextDrawSetShadow(Commands10);
TextDrawSetOutline(Commands11);
TextDrawBackgroundColor(Commands11);
TextDrawFont(Commands11);
TextDrawSetProportional(Commands11);
TextDrawUseBox(Commands1,2);
TextDrawBoxColor(Commands1,0x00000000);
TextDrawSetSelectable(Commands1,true);
//My Command.
CMD:commands(playerid,parmas[])
{
  
IsInCommands[playerid]=1;
  
TextDrawShowForPlayer(playerid,Commandsblackbox);
  
TextDrawShowForPlayer(playerid,Commandsbluebox);
  
TextDrawShowForPlayer(playerid,Commandsmenu);
  
TextDrawShowForPlayer(playerid,Textdraw31);
  
TextDrawShowForPlayer(playerid,Commands1);
  
TextDrawShowForPlayer(playerid,Commands2);
  
TextDrawShowForPlayer(playerid,Commands3);
  
TextDrawShowForPlayer(playerid,Commands4);
  
TextDrawShowForPlayer(playerid,Commands5);
  
TextDrawShowForPlayer(playerid,Commands6);
  
TextDrawShowForPlayer(playerid,Commands7);
  
TextDrawShowForPlayer(playerid,Commands8);
  
TextDrawShowForPlayer(playerid,Commands9);
  
TextDrawShowForPlayer(playerid,Commands10);
  
TextDrawShowForPlayer(playerid,Commands11);
  
TextDrawShowForPlayer(playerid,Commands12);
  
TextDrawShowForPlayer(playerid,Commands13);
  
TextDrawShowForPlayer(playerid,Commands14);
  
TextDrawShowForPlayer(playerid,Commands15);
  
TextDrawShowForPlayer(playerid,Commands16);
  
TextDrawShowForPlayer(playerid,Commands17);
  
TextDrawShowForPlayer(playerid,Commands18);
   
  
TextDrawShowForPlayer(playerid,Textdraw0);
  
TextDrawShowForPlayer(playerid,Textdraw1);
  
TextDrawShowForPlayer(playerid,Textdraw2);
  
TextDrawShowForPlayer(playerid,Textdraw3);
  
TextDrawShowForPlayer(playerid,Textdraw4);
  
TextDrawShowForPlayer(playerid,Textdraw5);
  
TextDrawShowForPlayer(playerid,Textdraw6);
  
TextDrawShowForPlayer(playerid,Textdraw7);
  
TextDrawShowForPlayer(playerid,Textdraw8);
  
TextDrawShowForPlayer(playerid,Textdraw9);
  
TextDrawShowForPlayer(playerid,Textdraw10);
  
TextDrawShowForPlayer(playerid,Textdraw11);
  
TextDrawShowForPlayer(playerid,Textdraw12);
  
TextDrawShowForPlayer(playerid,Textdraw13);
  
TextDrawShowForPlayer(playerid,Textdraw14);
  
TextDrawShowForPlayer(playerid,Textdraw15);
  
TextDrawShowForPlayer(playerid,Textdraw16);
  
TextDrawShowForPlayer(playerid,Textdraw17);
  
TextDrawShowForPlayer(playerid,Textdraw18);
  
TextDrawShowForPlayer(playerid,Textdraw19);
  
TextDrawShowForPlayer(playerid,Textdraw20);
  
TextDrawShowForPlayer(playerid,Textdraw21);
  
TextDrawShowForPlayer(playerid,Textdraw22);
  
TextDrawShowForPlayer(playerid,Textdraw23);
  
SelectTextDraw(playerid,0xFF0000AA);
  
  return 
1;

So when i select commands1 its to show my Textdraw1-23 but they both show the same time and it now toggles my control.
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

I think this is what you need. Also, when you create textdraws with TextDrawCreate, everyone in the server will be able to see it when you show it. And everyone in the server will be able to select the textdraw if it was set selectable. To create textdraws for every individual player, you must use this:

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
Reply
#3

Quote:
Originally Posted by Unte99
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

I think this is what you need. Also, when you create textdraws with TextDrawCreate, everyone in the server will be able to see it when you show it. And everyone in the server will be able to select the textdraw if it was set selectable. To create textdraws for every individual player, you must use this:

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
Not Clickable,Selectable ik how to do the Clickable but i dont like them and Yeah i also know that...
but just want to get the above code to work.
Reply
#4

Quote:
Originally Posted by Cashewz
Посмотреть сообщение
Not Clickable,Selectable ik how to do the Clickable but i dont like them and Yeah i also know that...
but just want to get the above code to work.
Are you ignoring what I am providing you with and are just waiting for someone to paste the code you wanted? Good luck then.
Reply
#5

Quote:
Originally Posted by Unte99
Посмотреть сообщение
Are you ignoring what I am providing you with and are just waiting for someone to paste the code you wanted? Good luck then.
Nope i didnt ignore it,but that callback function is for clickable textdraws am i right?,but i want Selectable thats why.
Reply
#6

Quote:
Originally Posted by Cashewz
Посмотреть сообщение
Nope i didnt ignore it,but that callback function is for clickable textdraws am i right?,but i want Selectable thats why.
Tell me, what does click and select mean? How do they differ?

Look at this link: https://sampwiki.blast.hk/wiki/TextDrawSetSelectable

Tell me, what do you see at the very bottom?

And did you even check the example code in https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw ?
Reply
#7

Bump.
Reply
#8

pawn Код:
Commands1 = TextDrawCreate(23.058822, 180.250076, "Commands");
TextDrawLetterSize(Commands1, 0.263175, 0.952498);
TextDrawAlignment(Commands1, 1);
TextDrawColor(Commands1, -1);
TextDrawSetShadow(Commands1, 0);
TextDrawSetOutline(Commands1, 1);
TextDrawBackgroundColor(Commands1, 1);
TextDrawFont(Commands1, 1);
TextDrawSetProportional(Commands1, 1);
TextDrawUseBox(Commands1,2);
TextDrawBoxColor(Commands1,0x00000000);
TextDrawSetSelectable(Commands1,true);

//My Command.
CMD:commands(playerid,parmas[])
{
    new page = strval(params);
    if(page == 0 || page < 0) page = 1;
    if(page == 1)
    {
        TextDrawShowForPlayer(playerid,Commandsblackbox);
        TextDrawShowForPlayer(playerid,Commandsbluebox);
        TextDrawShowForPlayer(playerid,Commandsmenu);
        TextDrawShowForPlayer(playerid,Textdraw31);
        TextDrawShowForPlayer(playerid,Commands1);
        TextDrawShowForPlayer(playerid,Commands2);
        TextDrawShowForPlayer(playerid,Commands3);
        TextDrawShowForPlayer(playerid,Commands4);
        TextDrawShowForPlayer(playerid,Commands5);
        TextDrawShowForPlayer(playerid,Commands6);
        TextDrawShowForPlayer(playerid,Commands7);
        TextDrawShowForPlayer(playerid,Commands8);
        TextDrawShowForPlayer(playerid,Commands9);
        TextDrawShowForPlayer(playerid,Commands10);
        TextDrawShowForPlayer(playerid,Commands11);
        TextDrawShowForPlayer(playerid,Commands12);
        TextDrawShowForPlayer(playerid,Commands13);
        TextDrawShowForPlayer(playerid,Commands14);
        TextDrawShowForPlayer(playerid,Commands15);
        TextDrawShowForPlayer(playerid,Commands16);
        TextDrawShowForPlayer(playerid,Commands17);
        TextDrawShowForPlayer(playerid,Commands18);
    }
    else if(page == 2)
    {
        TextDrawShowForPlayer(playerid,Textdraw0);
        TextDrawShowForPlayer(playerid,Textdraw1);
        TextDrawShowForPlayer(playerid,Textdraw2);
        TextDrawShowForPlayer(playerid,Textdraw3);
        TextDrawShowForPlayer(playerid,Textdraw4);
        TextDrawShowForPlayer(playerid,Textdraw5);
        TextDrawShowForPlayer(playerid,Textdraw6);
        TextDrawShowForPlayer(playerid,Textdraw7);
        TextDrawShowForPlayer(playerid,Textdraw8);
        TextDrawShowForPlayer(playerid,Textdraw9);
        TextDrawShowForPlayer(playerid,Textdraw10);
        TextDrawShowForPlayer(playerid,Textdraw11);
        TextDrawShowForPlayer(playerid,Textdraw12);
        TextDrawShowForPlayer(playerid,Textdraw13);
        TextDrawShowForPlayer(playerid,Textdraw14);
        TextDrawShowForPlayer(playerid,Textdraw15);
        TextDrawShowForPlayer(playerid,Textdraw16);
        TextDrawShowForPlayer(playerid,Textdraw17);
        TextDrawShowForPlayer(playerid,Textdraw18);
        TextDrawShowForPlayer(playerid,Textdraw19);
        TextDrawShowForPlayer(playerid,Textdraw20);
        TextDrawShowForPlayer(playerid,Textdraw21);
        TextDrawShowForPlayer(playerid,Textdraw22);
        TextDrawShowForPlayer(playerid,Textdraw23);
    }
    else
    {
        SendClientMessage(playerid, -1, "Unknown page entered!");
        return 1;
    }
    IsInCommands[playerid]=1;
    SelectTextDraw(playerid,0xFF0000AA);
    return 1;
}
Usage:
/commands [Page 1-2]

Is that what you need?
Reply
#9

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
pawn Код:
Commands1 = TextDrawCreate(23.058822, 180.250076, "Commands");
TextDrawLetterSize(Commands1, 0.263175, 0.952498);
TextDrawAlignment(Commands1, 1);
TextDrawColor(Commands1, -1);
TextDrawSetShadow(Commands1, 0);
TextDrawSetOutline(Commands1, 1);
TextDrawBackgroundColor(Commands1, 1);
TextDrawFont(Commands1, 1);
TextDrawSetProportional(Commands1, 1);
TextDrawUseBox(Commands1,2);
TextDrawBoxColor(Commands1,0x00000000);
TextDrawSetSelectable(Commands1,true);

//My Command.
CMD:commands(playerid,parmas[])
{
    new page = strval(params);
    if(page == 0 || page < 0) page = 1;
    if(page == 1)
    {
        TextDrawShowForPlayer(playerid,Commandsblackbox);
        TextDrawShowForPlayer(playerid,Commandsbluebox);
        TextDrawShowForPlayer(playerid,Commandsmenu);
        TextDrawShowForPlayer(playerid,Textdraw31);
        TextDrawShowForPlayer(playerid,Commands1);
        TextDrawShowForPlayer(playerid,Commands2);
        TextDrawShowForPlayer(playerid,Commands3);
        TextDrawShowForPlayer(playerid,Commands4);
        TextDrawShowForPlayer(playerid,Commands5);
        TextDrawShowForPlayer(playerid,Commands6);
        TextDrawShowForPlayer(playerid,Commands7);
        TextDrawShowForPlayer(playerid,Commands8);
        TextDrawShowForPlayer(playerid,Commands9);
        TextDrawShowForPlayer(playerid,Commands10);
        TextDrawShowForPlayer(playerid,Commands11);
        TextDrawShowForPlayer(playerid,Commands12);
        TextDrawShowForPlayer(playerid,Commands13);
        TextDrawShowForPlayer(playerid,Commands14);
        TextDrawShowForPlayer(playerid,Commands15);
        TextDrawShowForPlayer(playerid,Commands16);
        TextDrawShowForPlayer(playerid,Commands17);
        TextDrawShowForPlayer(playerid,Commands18);
    }
    else if(page == 2)
    {
        TextDrawShowForPlayer(playerid,Textdraw0);
        TextDrawShowForPlayer(playerid,Textdraw1);
        TextDrawShowForPlayer(playerid,Textdraw2);
        TextDrawShowForPlayer(playerid,Textdraw3);
        TextDrawShowForPlayer(playerid,Textdraw4);
        TextDrawShowForPlayer(playerid,Textdraw5);
        TextDrawShowForPlayer(playerid,Textdraw6);
        TextDrawShowForPlayer(playerid,Textdraw7);
        TextDrawShowForPlayer(playerid,Textdraw8);
        TextDrawShowForPlayer(playerid,Textdraw9);
        TextDrawShowForPlayer(playerid,Textdraw10);
        TextDrawShowForPlayer(playerid,Textdraw11);
        TextDrawShowForPlayer(playerid,Textdraw12);
        TextDrawShowForPlayer(playerid,Textdraw13);
        TextDrawShowForPlayer(playerid,Textdraw14);
        TextDrawShowForPlayer(playerid,Textdraw15);
        TextDrawShowForPlayer(playerid,Textdraw16);
        TextDrawShowForPlayer(playerid,Textdraw17);
        TextDrawShowForPlayer(playerid,Textdraw18);
        TextDrawShowForPlayer(playerid,Textdraw19);
        TextDrawShowForPlayer(playerid,Textdraw20);
        TextDrawShowForPlayer(playerid,Textdraw21);
        TextDrawShowForPlayer(playerid,Textdraw22);
        TextDrawShowForPlayer(playerid,Textdraw23);
    }
    else
    {
        SendClientMessage(playerid, -1, "Unknown page entered!");
        return 1;
    }
    IsInCommands[playerid]=1;
    SelectTextDraw(playerid,0xFF0000AA);
    return 1;
}
Usage:
/commands [Page 1-2]

Is that what you need?
Nope its to go,if u select 1. Commands1 it shows u Textdraw0 - 23
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)