Problem with this textdraw.
#1

Hello people,i wanna show score of player as textdraw and i do it this:

pawn Код:
forward tdscoretimer(playerid);
new tdscore[MAX_PLAYERS];
new Textdraw1[MAX_PLAYERS];
public tdscoretimer()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new tds[128];
            format(tds, sizeof(tds), "Score:%d",GetPlayerScore(i));
            TextDrawSetString(Textdraw1[i], tds);
        }
    }
    return 1;
}
OnGameModeInit:

pawn Код:
SetTimer("tdscoretimer", 5000, true);
OnPlayerDisconnect:

pawn Код:
TextDrawDestroy(Textdraw1[playerid]);
OnPlayerConnect:

pawn Код:
new tds[128];
    format(tds, sizeof(tds), "Score:%d",GetPlayerScore(playerid));
    Textdraw1[playerid] = TextDrawCreate(498.000000, 118.000000, tds);
    TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
And i get this:

warning 213: tag mismatch
warning 213: tag mismatch
warning 213: tag mismatch
warning 203: symbol is never used: "tdscore"

Thanks for help.
Reply
#2

pawn Код:
forward tdscoretimer(playerid);
//new tdscore[MAX_PLAYERS];
new Text:Textdraw1[MAX_PLAYERS];
public tdscoretimer()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new tds[128];
            format(tds, sizeof(tds), "Score:%d",GetPlayerScore(i));
            TextDrawSetString(Textdraw1[i], tds);
        }
    }
    return 1;
}
OnGameModeInit:

pawn Код:
SetTimer("tdscoretimer", 5000, true);
OnPlayerDisconnect:

pawn Код:
TextDrawDestroy(Textdraw1[playerid]);
OnPlayerConnect:

pawn Код:
new tds[128];
    format(tds, sizeof(tds), "Score:%d",GetPlayerScore(playerid));
    Textdraw1[playerid] = TextDrawCreate(498.000000, 118.000000, tds);
    TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)