Help with multiple Textdraw
#1

Hi all, i've a problem with multiple Textdraw in my GM. I want to show how many deaths have your player, for each players of course:

Code:
Top of the script:

new Text:Textdraw3[MAX_PLAYERS];
new death[MAX_PLAYERS];


OnGameModeInit:

for(new i=0; i<20; i++)
	{
	Textdraw3[i] = TextDrawCreate(171.000000,433.000000,"00"); //death
	TextDrawAlignment(Textdraw3[i],0);
	TextDrawBackgroundColor(Textdraw3[i],0x000000ff);
	TextDrawLetterSize(Textdraw3[i],0.399999,1.100000);
	TextDrawColor(Textdraw3[i],0xffffffff);
	TextDrawFont(Textdraw3[i],2);
	TextDrawSetProportional(Textdraw3[i],1);
	TextDrawSetShadow(Textdraw3[i],1);
    }


OnPlayerConnect:

death[playerid] = 0;


OnPlayerDeath:

death[playerid]++;
deathcounter(playerid);

Out of callbacks:

forward deathcounter(playerid);
public deathcounter(playerid)
{
new string[12];
format(string,sizeof(string),"%d",death[playerid]);
TextDrawSetString(Textdraw3[playerid],string);
}
But don't work at all..

Can anyone help me? Thx :>





Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)