Multipage Textdraw?
#1

Code creating TDs:
OnPlayerConnect
Код:
for(new a = 0; a < MAX_ITEMS_PER_PAGE; a++){ // MAX_ITEMS_PER_PAGE id not good, is 16, but must behigher...
    if((a % 4) == 0 && a >= 4){
        Textdraw[playerid][TD_Items][a] = CreatePlayerTextDraw(playerid, startPosX, startPosY, "Preview_Model");
        startPosX = 32.000000;
        startPosY += addToStartPosY;
    }
    Textdraw[playerid][TD_Items][a] = CreatePlayerTextDraw(playerid, startPosX, startPosY, "Preview_Model");
    startPosX += addToStartPosX;
    PlayerTextDrawFont(playerid, Textdraw[playerid][TD_Items][a], 5);
    PlayerTextDrawLetterSize(playerid, Textdraw[playerid][TD_Items][a], 0.600000, 2.000000);
    PlayerTextDrawTextSize(playerid, Textdraw[playerid][TD_Items][a], 37.500000, 34.500000);
    PlayerTextDrawSetOutline(playerid, Textdraw[playerid][TD_Items][a], 0);
    PlayerTextDrawSetShadow(playerid, Textdraw[playerid][TD_Items][a], 0);
    PlayerTextDrawAlignment(playerid, Textdraw[playerid][TD_Items][a], 1);
    PlayerTextDrawColor(playerid, Textdraw[playerid][TD_Items][a], -1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw[playerid][TD_Items][a], 125);
    PlayerTextDrawBoxColor(playerid, Textdraw[playerid][TD_Items][a], 1097458175);
    PlayerTextDrawUseBox(playerid, Textdraw[playerid][TD_Items][a], 0);
    PlayerTextDrawSetProportional(playerid, Textdraw[playerid][TD_Items][a], 1);
    PlayerTextDrawSetSelectable(playerid, Textdraw[playerid][TD_Items][a], 1);
    PlayerTextDrawSetPreviewModel(playerid, Textdraw[playerid][TD_Items][a], Weapon[a][ItemID]);
    PlayerTextDrawSetPreviewRot(playerid, Textdraw[playerid][TD_Items][a], -115.000000, -108.000000, -90.000000, 0.579999);
}

Textdraw[playerid][TD_BackPage] = CreatePlayerTextDraw(playerid, 45.000000, 324.000000, "<<");
PlayerTextDrawFont(playerid, Textdraw[playerid][TD_BackPage], 2);
PlayerTextDrawLetterSize(playerid, Textdraw[playerid][TD_BackPage], 0.258332, 1.750000);
PlayerTextDrawTextSize(playerid, Textdraw[playerid][TD_BackPage], 20.000000, 29.000000);
PlayerTextDrawSetOutline(playerid, Textdraw[playerid][TD_BackPage], 1);
PlayerTextDrawSetShadow(playerid, Textdraw[playerid][TD_BackPage], 0);
PlayerTextDrawAlignment(playerid, Textdraw[playerid][TD_BackPage], 2);
PlayerTextDrawColor(playerid, Textdraw[playerid][TD_BackPage], -1);
PlayerTextDrawBackgroundColor(playerid, Textdraw[playerid][TD_BackPage], 255);
PlayerTextDrawBoxColor(playerid, Textdraw[playerid][TD_BackPage], 200);
PlayerTextDrawUseBox(playerid, Textdraw[playerid][TD_BackPage], 1);
PlayerTextDrawSetProportional(playerid, Textdraw[playerid][TD_BackPage], 1);
PlayerTextDrawSetSelectable(playerid, Textdraw[playerid][TD_BackPage], 1);

Textdraw[playerid][TD_NextPage] = CreatePlayerTextDraw(playerid, 83.000000, 324.000000, ">>");
PlayerTextDrawFont(playerid, Textdraw[playerid][TD_NextPage], 2);
PlayerTextDrawLetterSize(playerid, Textdraw[playerid][TD_NextPage], 0.258332, 1.750000);
PlayerTextDrawTextSize(playerid, Textdraw[playerid][TD_NextPage], 20.000000, 29.000000);
PlayerTextDrawSetOutline(playerid, Textdraw[playerid][TD_NextPage], 1);
PlayerTextDrawSetShadow(playerid, Textdraw[playerid][TD_NextPage], 0);
PlayerTextDrawAlignment(playerid, Textdraw[playerid][TD_NextPage], 2);
PlayerTextDrawColor(playerid, Textdraw[playerid][TD_NextPage], -1);
PlayerTextDrawBackgroundColor(playerid, Textdraw[playerid][TD_NextPage], 255);
PlayerTextDrawBoxColor(playerid, Textdraw[playerid][TD_NextPage], 200);
PlayerTextDrawUseBox(playerid, Textdraw[playerid][TD_NextPage], 1);
PlayerTextDrawSetProportional(playerid, Textdraw[playerid][TD_NextPage], 1);
PlayerTextDrawSetSelectable(playerid, Textdraw[playerid][TD_NextPage], 1);
in OnPlayerClickPlayerTextDraw:
Код:
if(playertextid == Textdraw[playerid][TD_BackPage]){
    BackPage(playerid);
    return 1;
} else if(playertextid == Textdraw[playerid][TD_NextPage]){
    NextPage(playerid);
    return 1;
}
I don't know what functions NextPage and BackPage should contain..
Hello, I create textdraws with preview models, but I don't know how to create multipages (or scrollbar...).

Someone have any suggest for me?

Possibly it can be scrollbar, but i also don't know how to do it...
Reply


Messages In This Thread
Multipage Textdraw? - by CherryMond - 15.02.2019, 17:21
Re: Multipage Textdraw? - by ItsRobinson - 15.02.2019, 20:41
Re: Multipage Textdraw? - by CherryMond - 16.02.2019, 14:11
Re: Multipage Textdraw? - by ItsRobinson - 16.02.2019, 16:00
Re: Multipage Textdraw? - by CherryMond - 17.02.2019, 09:38

Forum Jump:


Users browsing this thread: 2 Guest(s)