21.12.2013, 15:43
(
Последний раз редактировалось Ananisiki; 24.12.2013 в 01:45.
)
~~~~~~
//dont create them OnConnect as it might get the TD ids messed up, do it like:
public OnGameModeInit()
{
foreach(Player,i)//create them here for every player in advance
{
Textdraw0[i] = TextDrawCreate(500.000000, 433.000000, "");
TextDrawBackgroundColor(Textdraw0[i], 255);
TextDrawFont(Textdraw0[i], 2);
TextDrawLetterSize(Textdraw0[i], 0.299999, 1.300000);
//and so on...
}
return 1;
}
//then just show and update them in your command like:
new ktd[32];
format(ktd,sizeof(ktd),"Kills: %d",kills[playerid]);// show what u wanna be shown, this is just an example
TextDrawSetString(Textdraw0[playerid],ktd);
PlayerTextDrawShow(playerid, Textdraw3[playerid]);
//You dont have to destroy the TDs OnDisconnect or smth., just update the TDs for the playerid as all
//TDs already have been created in advance under OnGameModeInit