TextDraw of death,kills, score and rank! (rep++) - 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: TextDraw of death,kills, score and rank! (rep++) (
/showthread.php?tid=339838)
TextDraw of death,kills, score and rank! (rep++) -
iOmar - 05.05.2012
Hey Guys:
> I want TextDraw on right top, under money portion.
It will like:
Kills: 2 \ Death: 5 \ Score: 5
Rank: Rookie (1)
I'll add all ranks by my own. Only give me hints. Please!!
Re: TextDraw of death,kills, score and rank! (rep++) -
TzAkS. - 05.05.2012
Код:
new string[MAX_PLAYERS];
format(string(sizeof(string),"Kills: %d",KillsFunction);
TextDrawSetString(TextDrawName,string);
format(string(sizeof(string),"Deaths: %d",DeathsFunction);
TextDrawSetString(TextDrawName,string);
format(string(sizeof(string),"Score: %d",ScoreFunction);
TextDrawSetString(TextDrawName,string);
Re: TextDraw of death,kills, score and rank! (rep++) -
iOmar - 05.05.2012
Where to put it?? On player text?? And whats will its location on screen??
Re: TextDraw of death,kills, score and rank! (rep++) -
[KHK]Khalid - 05.05.2012
They go under OnGamemode/FilterScriptInit.
First of all, you would create the TextDraw (
https://sampwiki.blast.hk/wiki/TextDrawCreate) then set a string into your TextDraw (TzAkS' example is just perfect), now you should show the TextDraw for a player (
https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer) or for all players (
https://sampwiki.blast.hk/wiki/TextDrawShowForAll).
Check
this tutorial out, it's very helpful