[HowTo] Score In A Textdraw i MEAN Kills And Deaths
#1

how to put player kills + death in a textdraw ? please help me... im scripting my own server...

i will thanks alot

like

Show

Kills: and the totalk kills Deaths: and total deaths... at the bottom right....

any help
Reply
#2

it depends what kind of text draw you want, there are many to be created, do you want one that is like this?

http://forum.sa-mp.com/index.php?topic=113746.0

if you do, you can ask in that topic, otherwise, be specific.
Reply
#3

Quote:
Originally Posted by [NaB
Hiitch - No srsly, Im a NaB ! ]
it depends what kind of text draw you want, there are many to be created, do you want one that is like this?

http://forum.sa-mp.com/index.php?topic=113746.0

if you do, you can ask in that topic, otherwise, be specific.
no just a textdraw that says Kills: and next to it one that says Deaths: at bottom right
Reply
#4

You need a stats system, then you need to get their kills and deaths from their file, and display it in the textdraw.
Reply
#5

First you put this:

new Text:TextTR,e1score,e2score;
new Text:Textdraw2, Text:Textdraw3;
new Text:TextCO;
new Text:TextRO;

In OnGameModeInt You put:

TextRO = TextDrawCreate(465.000000,416.000000,"GREECE");
TextTR = TextDrawCreate(465.000000,416.000000,"0");
TextCO = TextDrawCreate(560.000000,415.000000,"0");
Textdraw2 = TextDrawCreate(549.000000,401.000000,"Team 2");
Textdraw3 = TextDrawCreate(459.000000,401.000000,"Team 1");
TextDrawAlignment(TextCO,0);
TextDrawAlignment(TextRO,0);
TextDrawAlignment(TextTR,0);
TextDrawAlignment(Textdraw2,0);
TextDrawAlignment(Textdraw3,0);
TextDrawBackgroundColor(TextCO,COLOR_GRAD3);
TextDrawBackgroundColor(TextRO,COLOR_GRAD3);
TextDrawBackgroundColor(TextTR,COLOR_GRAD3);
TextDrawBackgroundColor(Textdraw2,COLOR_GRAD3);
TextDrawBackgroundColor(Textdraw3,COLOR_GRAD3);
TextDrawFont(TextCO,1);
TextDrawLetterSize(TextCO,0.899999,2.699999);
TextDrawFont(TextRO,1);
TextDrawLetterSize(TextRO,0.899999,2.699999);
TextDrawFont(TextTR,1);
TextDrawLetterSize(TextTR,0.899999,2.499999);
TextDrawFont(Textdraw2,3);
TextDrawLetterSize(Textdraw2,0.499999,1.100000);
TextDrawFont(Textdraw3,3);
TextDrawLetterSize(Textdraw3,0.399999,1.100000);
TextDrawColor(TextCO,COLOR_PURPLE);
TextDrawColor(TextTR,COLOR_ORANGE);
TextDrawColor(Textdraw2,COLOR_PURPLE);
TextDrawColor(Textdraw3,COLOR_ORANGE);
TextDrawSetOutline(TextCO,1);
TextDrawSetOutline(TextTR,1);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetOutline(Textdraw3,1);
TextDrawSetProportional(TextCO,1);
TextDrawSetProportional(TextTR,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetProportional(Textdraw3,1);
TextDrawSetShadow(TextCO,1);
TextDrawSetShadow(TextTR,1);
TextDrawSetShadow(Textdraw2,1);
TextDrawSetShadow(Textdraw3,1);
e1score=0;
e2score=0;

In OnPlayerSpawn You put:

TextDrawShowForAll(TextCO);
TextDrawShowForAll(TextTR);
TextDrawShowForAll(Textdraw2);
TextDrawShowForAll(Textdraw3);

And in OnPlayerDeath You put:

new string1[256], string2[256];
valstr(string1, e1score);
TextDrawSetString(TextCO, string1);
valstr(string2, e2score);
TextDrawSetString(TextTR, string2);
if(gTeam[killerid] == TEAM_1)
{
e1score++;
}
if(gTeam[killerid] == TEAM_2)
{
e2score++;
}

bye..............

sorry for my bad english
Reply
#6

What color u defined with COLOR_GRAD3

pawn Код:
#define COLOR_GRAD3 ????????

Shinigami
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)