Kills death 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: Kills death Textdraw (
/showthread.php?tid=169005)
Kills death Textdraw -
Kitten - 17.08.2010
Solved
Re: Kills death Textdraw -
[XST]O_x - 17.08.2010
Because you're setting the Kills and Deaths value from the moment they are created,it will also not update.
Set the strings every time OnPlayerDeath is called.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string1[24],string2[24];
Kills[killerid] ++;
Deaths[playerid] ++;
format(string1,sizeof(string1),"Kills: %d",Kills[killerid]);
format(string2,sizeof(string2),"Deaths: %d",Deaths[playerid]);
TextDrawSetString(Textdraw0,string1);
TextDrawSetString(Textdraw1,string2);
return 1;
}
Re: Kills death Textdraw -
gamer931215 - 17.08.2010
Does it even show ? because i dont see TextDrawShowForPlayer,
pawn Код:
OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
}
Re: Kills death Textdraw -
Kitten - 17.08.2010
Solved
Re: Kills death Textdraw -
gamer931215 - 17.08.2010
Ah so you just want to update it, well just what [XST]O_x said, TextDrawSetString(id,text);
Re: Kills death Textdraw -
Kitten - 17.08.2010
Solved
Re: Kills death Textdraw -
Kitten - 17.08.2010
Solved
Re: Kills death Textdraw -
gamer931215 - 17.08.2010
Quote:
Originally Posted by Kitten
the box is empty what am i doing wrong
|
Are you using ShowTextDrawForAll, or for player ?
because ForAll works only for the players connected at the time the function is called, so not if you join later.
Re: Kills death Textdraw -
Kitten - 17.08.2010
Solved
Re: Kills death Textdraw -
gamer931215 - 17.08.2010
Quote:
Originally Posted by Kitten
ill try ForAll
|
no !!! again that one will only show for the players who are online at THAT SPECEFIC MOMENT, i guess you use it at gamemodeinit so no players will see it then.
Do TextDrawShowForPlayer at OnPlayerConnect.