TextDrawFAILShowForPlayer
#1

Hello everyone . I have a BIG problem with my textdraws... They are not showing for nothing in this world, and it's pissing me off

pawn Код:
public OnGameModeInit()
{
 .......
    TXD1 = TextDrawCreate(110.000000, 142.000000, "_");
    TextDrawBackgroundColor(TXD1, 255);
    TextDrawFont(TXD1, 1);
    TextDrawLetterSize(TXD1, 3.599998, 18.099998);
    TextDrawColor(TXD1, -1);
    TextDrawSetOutline(TXD1, 0);
    TextDrawSetProportional(TXD1, 1);
    TextDrawSetShadow(TXD1, 1);
    TextDrawUseBox(TXD1, 1);
    TextDrawBoxColor(TXD1, 68);
    TextDrawTextSize(TXD1, 545.000000, 0.000000);

    TXD2 = TextDrawCreate(257.000000, 180.000000, "Loading...");
    TextDrawBackgroundColor(TXD2, 255);
    TextDrawFont(TXD2, 1);
    TextDrawLetterSize(TXD2, 1.000000, 6.099999);
    TextDrawColor(TXD2, -1);
    TextDrawSetOutline(TXD2, 0);
    TextDrawSetProportional(TXD2, 1);
    TextDrawSetShadow(TXD2, 0);....
return 1;
}

public OnPlayerConnect(playerid)
{
                           TextDrawShowForPlayer(playerid,TXD1);
        TextDrawShowForPlayer(playerid,TXD2);
.....
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
    SetSpawnInfo(playerid ,0 ,7 ,1743.1537 ,-1860.5883 ,13.5786 ,0 ,0 ,0 ,0 ,0 ,0 ,0);
    TogglePlayerSpectating(playerid, true);
    SetTimerEx("OnPlayerLogin", 4000, 0, "i", playerid);
    return 1;
}
public OnPlayerLogin(playerid)
{
    TextDrawHideForPlayer(playerid,loadbox);
    TextDrawHideForPlayer(playerid,loadmsg);
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file),USER_FILE,name);
    if(!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1,DIALOG_STYLE_INPUT, "Register Box","You didn't registered yet. Write down in the box a password to register !", "Register","Quit");
    }
    else if(fexist(file) && PlayerLogged[playerid] == 0)
    {
        PlayerInfo[playerid][pBan] = dini_Int(file, "Ban");
        new tmpR[64];
        strmid(tmpR,dini_Get(file,"Reason"),0,strlen(dini_Get(file,"Reason")),64);
        if(PlayerInfo[playerid][pBan] == 1)
        {
            for(new i=0;i<25;i++)
            {
                SendClientMessage(playerid,COLOR_WHITE,"");
            }
            new IP[16],string[64],bname[25];
            GetPlayerIp(playerid,IP,16);
            GetPlayerName(playerid,bname,25);
            SendClientMessage(playerid,COLOR_YELLOW,"|__________________[Ban Info]__________________|");
            SendClientMessage(playerid,COLOR_YELLOW,"[BAN]: This account is suspended on this server !");
            format(string,sizeof(string),"Name:{FFFFFF}%s",bname);
            SendClientMessage(playerid,COLOR_YELLOW,string);
            format(string,sizeof(string),"IP:{FFFFFF}%s",IP);
            SendClientMessage(playerid,COLOR_YELLOW,string);
            format(string,sizeof(string),"Reason:{FFFFFF}%s",tmpR);
            SendClientMessage(playerid,COLOR_YELLOW,string);
            SendClientMessage(playerid,COLOR_YELLOW,"________________________________________");
            TogglePlayerControllable(playerid,0);
            TextDrawShowForPlayer(playerid,txtbanned);
            TextDrawShowForPlayer(playerid,boxbanned);
            SetTimerEx("TKick",1500,false,"i",playerid);
        }
        else
        {
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Login Box","Your account has been founded in our database. Please login !","Login","Quit");
        }
    }
    PlayerInfo[playerid][pReportMute] = dini_Int(file, "ReportMute");
    PlayerInfo[playerid][pMute] = dini_Int(file, "Mute");
    if(PlayerInfo[playerid][pMute] != 0 || PlayerInfo[playerid][pReportMute] != 0)
    {
        SetTimerEx("Mute",60*1000,false,"i",playerid);
    }
    return 1;
}
...but my textdraw clock it's working perfectly, but it's loaded from a FS, and if I add to GameMode it won't show.

I tried to put this on a FS but didn't work, and I'm desperated
Reply
#2

what happens if you leave out the clock FS ?

I guess it will work then because the textdraws are conflicting with eachother.. At least thats what i think is going
on. It happend to me many times giving me the ARGGGHH too.
Heres how i fixed it;
make every textdraw you have a playertextdraw

like these;

pawn Код:
txtInit[playerid] = CreatePlayerTextDraw(playerid,320.0, 240.0, "_");//MAKE PLAYERTEXTDRAW
    PlayerTextDrawFont(playerid,txtInit[playerid],TEXT_DRAW_FONT_MODEL_PREVIEW);
    PlayerTextDrawBackgroundColor(playerid,txtInit[playerid], COLOR_INVISIBLE);
    PlayerTextDrawTextSize(playerid,txtInit[playerid], 150.0,150.0);
    PlayerTextDrawSetPreviewModel(playerid,txtInit[playerid], 124);
not to be confused with other player textdraws
Reply
#3

Lol awsome O.o , tnx dude it work

I'm feel so stupid right now....
Reply
#4

Quote:
Originally Posted by Psyhophatic
Посмотреть сообщение
Lol awsome O.o , tnx dude it work

I'm feel so stupid right now....
Its not stupid making nice textdraws that actually work just needs some practise and ALOT of patience.
I wish there was some kind of paint textdraw tool for it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)