Is This Code Right ?
#1

hello guys just check and tell me if this code is right or not because when i compile it tells me tag mismatch
pawn Код:
public OnPlayerConnect(playerid)
{
    new tds[128];
    format(tds, sizeof(tds), "Score:%d",GetPlayerScore(playerid));
    Textdraw1[playerid] = TextDrawCreate(511.000000, 102.000000, tds);
    TextDrawBackgroundColor(Textdraw1[playerid], 16711935);
    TextDrawFont(Textdraw1[playerid], 1);
    TextDrawLetterSize(Textdraw1[playerid], 0.529999, 2.000000);
    TextDrawColor(Textdraw1[playerid], -1);
    TextDrawSetOutline(Textdraw1[playerid], 1);
    TextDrawSetProportional(Textdraw1[playerid], 1);
    TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
    new string[ 128 ];
    Textdraw0[playerid] = TextDrawCreate(517.000000, 81.000000, "Rank:~r~");
    TextDrawBackgroundColor(Textdraw0[playerid], 16711935);
    TextDrawFont(Textdraw0[playerid], 1);
    TextDrawLetterSize(Textdraw0[playerid], 0.524999, 2.000000);
    TextDrawColor(Textdraw0[playerid], -1);
    TextDrawSetOutline(Textdraw0[playerid], 1);
    TextDrawSetProportional(Textdraw0[playerid], 1);
    TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
        return 1;
}
if it is not right tell me the right one :P
Reply
#2

I think the problem is that you cant put stuff like ~r~ in textdraws you can only put them throu format.

format(string,sizeof(string),"Rank: %s", Player Rank variable HERE);
Textdraw0[playerid] = TextDrawCreate( 517.00000, 81.00000, string);

I hope this will work. + rep me if it did.
Reply
#3

Quote:
Originally Posted by silvan
Посмотреть сообщение
I think the problem is that you cant put stuff like ~r~ in textdraws you can only put them throu format.

format(string,sizeof(string),"Rank: %s", Player Rank variable HERE);
Textdraw0[playerid] = TextDrawCreate( 517.00000, 81.00000, string);

I hope this will work. + rep me if it did.
thx by the way i will try it at the soonest time if it works i will +rep u :P
Reply
#4

Quote:
Originally Posted by silvan
Посмотреть сообщение
I think the problem is that you cant put stuff like ~r~ in textdraws you can only put them throu format.
Actually you can use it without format.

In which line(s) do you have a tag mismatch warning(s)?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)