SA-MP Forums Archive
Player TD - 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)
+--- Thread: Player TD (/showthread.php?tid=482527)



Player TD - Ananisiki - 21.12.2013

~~~~~~


Re: Player TD - CutX - 21.12.2013

make them show with: PlayerTextDrawShow
theyre player textdraws now, so TextDrawShowForPlayer won't work


Re: Player TD - Ananisiki - 21.12.2013

~~~~~~~~


Re: Player TD - BlackWolf120 - 21.12.2013

what exactly is "messed up"?
Please show the code where you are creating the texdraws.


Re: Player TD - Ananisiki - 21.12.2013

~~~~~~


Re: Player TD - BlackWolf120 - 21.12.2013

pawn Код:
//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



Re: Player TD - Ananisiki - 21.12.2013

~~~~~~


Re: Player TD - Ananisiki - 22.12.2013

~~~~~~