SA-MP Forums Archive
A little help please . text draw dont show - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A little help please . text draw dont show (/showthread.php?tid=374403)



A little help please . text draw dont show - Jaber_Brown - 02.09.2012

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


Re: A little help please . text draw dont show - Misiur - 02.09.2012

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


Re : A little help please . text draw dont show - Jaber_Brown - 02.09.2012

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


Re: A little help please . text draw dont show - Misiur - 02.09.2012

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


Re : A little help please . text draw dont show - Jaber_Brown - 02.09.2012

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

right ?


Re: A little help please . text draw dont show - Misiur - 02.09.2012

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