A little help please . text draw dont show
#1

I got this

pawn Код:
public OnPlayerRequestClass(playerid)
{
    gOoc[ playerid ] = 0; Logged[ playerid ] = 0;
    // Reset stats!
    PlayerInfo[ playerid ][ pCash ] = 0;
    PlayerInfo[ playerid ][ pAdmin ] = 0;
    PlayerInfo[ playerid ][ pSex ] = 0;
    PlayerInfo[ playerid ][ pAge ] = 0;
    PlayerInfo[ playerid ][ pPos_x ] = 0.0;
    PlayerInfo[ playerid ][ pPos_y ] = 0.0;
    PlayerInfo[ playerid ][ pPos_z ] = 0.0;
    PlayerInfo[ playerid ][ pSkin ] = 0;
    PlayerInfo[ playerid ][ pTeam ] = 0;
    PlayerInfo[ playerid ][ pAccent ] = 0;

    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        Textdraw0 = TextDrawCreate(712.000000, 1.000000, "-");
        TextDrawBackgroundColor(Textdraw0, 255);
        TextDrawFont(Textdraw0, 0);
        TextDrawLetterSize(Textdraw0, 0.439999, 11.500006);
        TextDrawColor(Textdraw0, 255);
        TextDrawSetOutline(Textdraw0, 0);
        TextDrawSetProportional(Textdraw0, 1);
        TextDrawSetShadow(Textdraw0, 1);
        TextDrawUseBox(Textdraw0, 1);
        TextDrawBoxColor(Textdraw0, 255);
        TextDrawTextSize(Textdraw0, -7.000000, 2.000000);

        InterpolateCameraPos(playerid, 2195.823242, -2341.347167, 44.031036, 1514.338256, -814.163330, 364.546600, 34000);
        InterpolateCameraLookAt(playerid, 2193.502441, -2336.918457, 44.054473, 1514.557983, -818.763366, 362.599517, 34000);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login to your account.","{FFD000}Note - {FFFFFF}An account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel.","Login","Cancel");
    }
    else
    {
        Textdraw1 = TextDrawCreate(712.000000, 335.000000, "-");
        TextDrawBackgroundColor(Textdraw1, 255);
        TextDrawFont(Textdraw1, 0);
        TextDrawLetterSize(Textdraw1, 0.439999, 12.300008);
        TextDrawColor(Textdraw1, 255);
        TextDrawSetOutline(Textdraw1, 0);
        TextDrawSetProportional(Textdraw1, 1);
        TextDrawSetShadow(Textdraw1, 1);
        TextDrawUseBox(Textdraw1, 1);
        TextDrawBoxColor(Textdraw1, 255);
        TextDrawTextSize(Textdraw1, -7.000000, 2.000000);

        InterpolateCameraPos(playerid, 2195.823242, -2341.347167, 44.031036, 1514.338256, -814.163330, 364.546600, 34000);
        InterpolateCameraLookAt(playerid, 2193.502441, -2336.918457, 44.054473, 1514.557983, -818.763366, 362.599517, 34000);
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Register your account.","{FFD000}Note - {FFFFFF}An account with this name was not found inside the database.\n if you would like to register this account,\n type in the password you would like to register with.","Register","Cancel");

    }
    return 1;
}
The dialogs seem to work just fine, but textdraws dont show
Reply
#2

Read the wiki more carefully. TextDrawShowFor(Player/All) is required
Reply
#3

Sorry dude, im still learning pawn, starting to make my own gamemode, can you please tell me more details ? Thanks in advance
Reply
#4

https://sampwiki.blast.hk/wiki/TextDrawCreate - last eye-rape colored box which leads to
https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer
Reply
#5

YOu mean i have to add
TextDrawShowForPlayer(playerid, TextDraw1);
TextDrawShowForPlayer(playerid, TextDraw2);

right ?
Reply
#6

More like TextDraw0 and TextDraw1, but yes, I do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)