How to put player kills into a textdraw?[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: How to put player kills into a textdraw?[REP] (
/showthread.php?tid=562140)
How to put player kills into a textdraw?[REP] -
Kruno88 - 07.02.2015
Does anyone know?And how to put players health in it too XD
Re: How to put player kills into a textdraw?[REP] -
HY - 07.02.2015
First, create a textdraw. You can use an Editor like:
iPLEOMAX's Textdraw Editor.
Under OnPlayerSpawn.
Or, set a timer, if you want to update every time, else, will remain same kills on textdraws.
pawn Код:
public OnPlayerSpawn(playerid)
{
new string[5];
format(string, sizeof(string), "%d", PlayerInfo[playerid][pKills]); // I don't know your variable.
TextDrawSetString(TextdrawName, string);
return 1;
}
Re: How to put player kills into a textdraw?[REP] -
CalvinC - 07.02.2015
First create your textdraw, then use
TextDrawSetString to set the textdraws string.
Example:
pawn Код:
format(string, sizeof(string), "Hello %s.", name);
TextDrawSetString(textdrawname, string);
Re: How to put player kills into a textdraw?[REP] -
Kruno88 - 07.02.2015
Quote:
Originally Posted by HY
First, create a textdraw. You can use an Editor like: iPLEOMAX's Textdraw Editor.
Under OnPlayerSpawn.
Or, set a timer, if you want to update every time, else, will remain same kills on textdraws.
pawn Код:
public OnPlayerSpawn(playerid) { new string[5]; format(string, sizeof(string), "%d", PlayerInfo[playerid][pKills]); // I don't know your variable. TextDrawSetString(TextdrawName, string); return 1; }
|
Thank you!+REP