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[])
{
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;
}
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. |
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.
|
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;
}
pawn Код:
/commands [Page 1-2] Is that what you need? |