[Question] Show Score with Textdraw
#1

Hi all,
I Wanted to show the core of tho Teams with Textdraw. Here is a part of the Script:
pawn Код:
#include <a_samp>

new DNBScore;
new WScore;
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;

forward UpdateScoreText();

public OnGameModeInit()
{
  SetTimer("UpdateScoreText",5000,1);
  DNBScore = 0;
    WScore = 0;
  Textdraw0 = TextDrawCreate(499.000000,103.000000,"Punktestand:");
    Textdraw1 = TextDrawCreate(499.000000,127.000000,"Arbeiter:");
    Textdraw3 = TextDrawCreate(499.000000,149.000000,"Da Nang Boys:");
    TextDrawTextSize(Textdraw0,607.000000,12.000000);
    TextDrawTextSize(Textdraw1,607.000000,0.000000);
    TextDrawTextSize(Textdraw3,607.000000,0.000000);
    TextDrawLetterSize(Textdraw0,0.499999,2.100000);
    TextDrawLetterSize(Textdraw1,0.399999,2.000000);
    TextDrawLetterSize(Textdraw2,0.399999,1.999999);
    TextDrawLetterSize(Textdraw3,0.299999,1.800000);
    TextDrawLetterSize(Textdraw4,0.399999,2.000000);
    TextDrawColor(Textdraw0,0xffffffff);
    TextDrawColor(Textdraw1,0x0000ffcc);
    TextDrawColor(Textdraw2,0x0000ffcc);
    TextDrawColor(Textdraw3,0xff0000cc);
    TextDrawColor(Textdraw4,0xff0000cc);
    return 1;
}

public UpdateScoreText()
{
    new score1[32];
    format(score1,sizeof(score1),"%d",WScore);
    TextDrawSetString(Textdraw2,score1);
    TextDrawShowForAll(Textdraw2);
    new score2[32];
    format(score2,sizeof(score2),"%d",DNBScore);
    TextDrawSetString(Textdraw4,score2);
    TextDrawShowForAll(Textdraw4);
    return 1;
}

public OnPlayerConnect(playerid)
{
        TextDrawShowForPlayer(playerid,Text:Textdraw0);
        TextDrawShowForPlayer(playerid,Text:Textdraw1);
        TextDrawShowForPlayer(playerid,Text:Textdraw3);
  return 1;
}
Almost everythink works well, but the Score, I want to show, is in the corner of the screen.
Can you help me?
Reply


Messages In This Thread
[Question] Show Score with Textdraw - by Marc_307 - 09.04.2009, 14:39
Re: [Question] Show Score with Textdraw - by Danand - 09.04.2009, 14:40
Re: [Question] Show Score with Textdraw - by ICECOLDKILLAK8 - 09.04.2009, 14:41
Re: [Question] Show Score with Textdraw - by Rks25 - 09.04.2009, 14:44
Re: [Question] Show Score with Textdraw - by Marc_307 - 09.04.2009, 14:53
Re: [Question] Show Score with Textdraw - by SpiderPork - 09.04.2009, 14:55
Re: [Question] Show Score with Textdraw - by Marc_307 - 09.04.2009, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)