Problem with this textdraw. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with this textdraw. (
/showthread.php?tid=258654)
Problem with this textdraw. -
Face9000 - 31.05.2011
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.
Re: Problem with this textdraw. - [L3th4l] - 31.05.2011
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]);
Re: Problem with this textdraw. -
Face9000 - 31.05.2011
Thanks