Help with multiple 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: Help with multiple Textdraw (
/showthread.php?tid=74049)
Help with multiple Textdraw -
Leoxide - 19.04.2009
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 :>