textdraws
#1

Well, i want to have a textdraw at the class selection.
For example:
Currently i've got:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1963.0435, 1342.9009, 16.6642);
    SetPlayerCameraLookAt(playerid, 1962.0388, 1342.8906, 16.5992);
    switch(classid)
    {
     case 0:
        {
        new PlayerText:Textdraw0[MAX_PLAYERS];
        new PlayerText:Textdraw1[MAX_PLAYERS];
        new PlayerText:Textdraw2[MAX_PLAYERS];
        new PlayerText:Textdraw3[MAX_PLAYERS];
        new PlayerText:Textdraw4[MAX_PLAYERS];


        Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 145.125000, 405.750000, "usebox");
        PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.000000, -24.103704);
        PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 305.500000, 0.000000);
        PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
        PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
        PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
        PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 102);
        PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
        PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);

        Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 197.500000, 196.000015, "Soldier");
        PlayerTextDrawLetterSize(playerid, Textdraw1[playerid], 0.646874, 2.387500);
        PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 1);
        PlayerTextDrawColor(playerid, Textdraw1[playerid], 8388863);
        PlayerTextDrawSetShadow(playerid, Textdraw1[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 1);
        PlayerTextDrawBackgroundColor(playerid, Textdraw1[playerid], 51);
        PlayerTextDrawFont(playerid, Textdraw1[playerid], 0);
        PlayerTextDrawSetProportional(playerid, Textdraw1[playerid], 1);

        Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 148.125000, 217.000015, "Weapons:");
        PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.449999, 1.600000);
        PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 1);
        PlayerTextDrawColor(playerid, Textdraw2[playerid], -1);
        PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Textdraw2[playerid], 1);
        PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid], 51);
        PlayerTextDrawFont(playerid, Textdraw2[playerid], 0);
        PlayerTextDrawSetProportional(playerid, Textdraw2[playerid], 1);

        Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 148.750000, 345.916656, "Speciality");
        PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.449999, 1.600000);
        PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
        PlayerTextDrawColor(playerid, Textdraw3[playerid], -1);
        PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
        PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
        PlayerTextDrawFont(playerid, Textdraw3[playerid], 0);
        PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);

        Textdraw4[playerid] = CreatePlayerTextDraw(playerid, 148.125000, 238.583328, "Test");
        PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.449999, 1.600000);
        PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
        PlayerTextDrawColor(playerid, Textdraw4[playerid], -1);
        PlayerTextDrawSetShadow(playerid, Textdraw4[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
        PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
        PlayerTextDrawFont(playerid, Textdraw4[playerid], 0);
        PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1);
        }
     case 1:
        {
            SendClientMessage(playerid,-1 ,"Soldier");
        }
    }
    return 1;
}
Also i want to have the same textdraw for every class, but with different text. Is there like a easyer way then this? else my script will be spammed. (error here = that the textdraws aint showing, and i'm a noob if it goed about textdraws)
Reply
#2

Where is the place exactly you want to put it in the script?
Reply
#3

Like it says, onplayerrequestclass.... so when they choose a class, they see the textdraw for each class.
Reply
#4

i still need help (sorry for bumping)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)