Textdraw problem only updates for id 1
#1

yo i did an kill/deathtextdraw which should show the kill/deathstats of a player but it only updates for the first id
could u tell me why?

pawn Код:
//Ontop of the Script
forward text(playerid);
new Text:text1[MAX_PLAYERS];

//On FS Init
SetTimer("text", 300, 1);
for (new i = 0; i < MAX_PLAYERS; i++)
{
text1[i] = TextDrawCreate(40.000000,430.000000,"0");
}

//OnPlayerLogin
format(str2,256,"http://www.pure-everything.co.nr Kills: %d Deaths: %d",AccountInfo[playerid][Kills],AccountInfo[playerid][Deaths]);
TextDrawSetString(text1[playerid],str2);
TextDrawColor(text1[playerid],0xFFFFFFFF);
TextDrawSetShadow(text1[playerid],1);
TextDrawShowForPlayer(playerid,text1[playerid]);

//public text
public text(playerid)
{
if(AccountInfo[playerid][Logged] == 1)
{
new str2[256];
format(str2,256,"http://www.pure-everything.co.nr[url=http://] Kills: %d Deaths: %d",AccountInfo[playerid][Kills],AccountInfo[playerid][Deaths]);
TextDrawSetString(text1[playerid],str2);
TextDrawHideForPlayer(playerid,text1[playerid]);
TextDrawShowForPlayer(playerid,text1[playerid]);
}
return 1;
}

// /resetstats
if(strcmp(cmd, "/resetstats", true) == 0)
{
new str2[256];
AccountInfo[playerid][Kills] = 0;
AccountInfo[playerid][Deaths] = 0;
format(str2,256,"http://www.pure-everything.co.nr[url=http://] Kills: %d Deaths: %d Hours: %d",AccountInfo[playerid][Kills],AccountInfo[playerid][Deaths],AccountInfo[playerid][Hours]);
TextDrawSetString(text1[playerid],str2);
TextDrawHideForPlayer(playerid,text1[playerid]);
TextDrawShowForPlayer(playerid,text1[playerid]);
return 1;
}

//OnPlayerDeath
AccountInfo[playerid][Deaths]++;
AccountInfo[killerid][Kills]++;
Reply


Messages In This Thread
Textdraw problem only updates for id 1 - by saiberfun - 30.06.2009, 16:58
Re: Textdraw problem only updates for id 1 - by saiberfun - 30.06.2009, 18:22
Re: Textdraw problem only updates for id 1 - by kaisersouse - 30.06.2009, 18:36
Re: Textdraw problem only updates for id 1 - by saiberfun - 30.06.2009, 18:52
Re: Textdraw problem only updates for id 1 - by dice7 - 30.06.2009, 19:48
Re: Textdraw problem only updates for id 1 - by Ignas1337 - 01.07.2009, 07:44
Re: Textdraw problem only updates for id 1 - by Ignas1337 - 01.07.2009, 07:49

Forum Jump:


Users browsing this thread: 1 Guest(s)