PDA

View Full Version : TextDraw of death,kills, score and rank! (rep++)


iOmar
05/05/2012, 07:10 AM
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!!

TzAkS.
05/05/2012, 07:14 AM
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);

iOmar
05/05/2012, 07:52 AM
Where to put it?? On player text?? And whats will its location on screen??

[KHK]Khalid
05/05/2012, 08:04 AM
They go under OnGamemode/FilterScriptInit.

First of all, you would create the TextDraw (http://wiki.sa-mp.com/wiki/TextDrawCreate) then set a string into your TextDraw (TzAkS' example is just perfect), now you should show the TextDraw for a player (http://wiki.sa-mp.com/wiki/TextDrawShowForPlayer) or for all players (http://wiki.sa-mp.com/wiki/TextDrawShowForAll).

Check this tutorial (http://forum.sa-mp.com/showthread.php?t=2867) out, it's very helpful