Text Drawer not opening
#1

pawn Код:
public OnPlayerSpawn(playerid)
{
    Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 152.628448, 100.693260, "WELCOME TO MY TEST SERVER");
    PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.500398, 3.322310);
    PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 2);
    PlayerTextDrawColor(playerid, Textdraw0[playerid], -2147483393);
    PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw0[playerid], 3);
    PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);

    //spawnmessages
    SendClientMessage(playerid, COLOR_GREEN, "Welcome to my Server");
    SendClientMessage(playerid, COLOR_RED, "Here are my scripts and maps for testing.");
    SendClientMessage(playerid, COLOR_ORANGE, "This is only a test server");
    SendClientMessage(playerid, COLOR_WHITE, "/info for a list of commands");
    SetPlayerInterior(playerid, 0);
    return 1;
}
it compiles but I cant see it?
Reply
#2

add PlayerTextDrawShow(playerid, Textdraw0[playerid]);
under PlayerTextDrawSetProportional
Reply
#3

Also, as I see you create a TextDraw everytime the player spawns.
Create it in OnGameModeInit and show it to players in OnPlayerSpawn, or OnPlayerConnect, then hide it.
The script you're using isn't good for optimization.
Reply
#4

Can you explain to me how to do that?
Reply
#5

If TextDraw's text will be always the same, do this:
pawn Код:
public OnPlayerConnect(playerid) {
    Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 152.628448, 100.693260, "WELCOME TO MY TEST SERVER");
    PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.500398, 3.322310);
    PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 2);
    PlayerTextDrawColor(playerid, Textdraw0[playerid], -2147483393);
    PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw0[playerid], 3);
    PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);

    PlayerTextDrawShow(playerid, TextDraw0[playerid]);
    return 1;
}
public OnPlayerSpawn(playerid) {
    PlayerTextDrawHide(playerid, TextDraw0[playerid]);
    return 1;
}
Reply
#6

so I cant do other text draws if I do this?

edit

I tried this is doesnt work, I used a editor to make this, I can make this textdraw show up but idk how to make it hide?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)