Variables. += Dosn't work.
#4

MadeMan code working. I trying to do it with TextDraw and it wont work. theres my script :
Quote:

new Text:Textdraw0;
new Text:Textdraw1;
new zNuzudimai = 1;
new mNuzudimai = 1;

Quote:

public OnGameModeInit()
{
new statistika[128];
format(statistika,sizeof(statistika), "~g~Team Green Score: %d",zNuzudimai);
Textdraw0 = TextDrawCreate(432.000000, 366.000000,statistika);
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawTextSize(Textdraw0, 628.000000, 0.000000);
new statistika1[128];
format(statistika1,sizeof(statistika1), "~b~TEAM Blue Score: %d",mNuzudimai);
Textdraw1 = TextDrawCreate(432.000000, 381.000000, statistika1);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, 628.000000, 0.000000);

for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if (gTeam[playerid] == TEAM_M)
{
mNuzudimai += 1;
}
else if (gTeam[playerid] == TEAM_Z)
{
zNuzudimai += 1;
}
return 1;
}

When player die or I write command to incerace value the TextDraw doesn't write new variable value. Maybe I have to update Text draw Somehow ?
Reply


Messages In This Thread
Variables. += Dosn't work. - by Ernis456 - 20.08.2010, 18:03
Re: Variables. += Dosn't work. - by MadeMan - 20.08.2010, 18:09
Re: Variables. += Dosn't work. - by CaHbKo - 20.08.2010, 18:11
Re: Variables. += Dosn't work. - by Ernis456 - 20.08.2010, 18:20
Re: Variables. += Dosn't work. - by Sky4D - 20.08.2010, 18:28
Re: Variables. += Dosn't work. - by MadeMan - 20.08.2010, 18:30
Re: Variables. += Dosn't work. - by Ernis456 - 20.08.2010, 18:36
Re: Variables. += Dosn't work. - by Finn - 20.08.2010, 18:44
Re: Variables. += Dosn't work. - by Ernis456 - 20.08.2010, 19:08
Re: Variables. += Dosn't work. - by Claude - 20.08.2010, 20:12

Forum Jump:


Users browsing this thread: 2 Guest(s)