Show result in textdraw (AAD70)
#1

Hi guys, i wanna put the result of the 2 teams (Attack and Defence) in a Textdraw.
I see the result with TeamRoundsWon[T_HOME] and TeamRoundsWon[T_AWAY] when i do /scores.
now i wanna do same but with textraw.
i try with
Код:
	risultato = TextDrawCreate(526, 141, "TeamRoundsWon[T_HOME] / TeamRoundsWon[T_AWAY]");
	TextDrawFont(risultato , 1);
	TextDrawLetterSize(risultato , 1, 7);
	TextDrawSetOutline(risultato , 0);
	TextDrawSetProportional(risultato , 1);
	TextDrawSetShadow(risultato , 1);
but whe i enter ingame i see only TeamRoundsWon
how can i do?
Thanks and sorry for my bad english >_<
Reply
#2

First of all, you have to create an array for both the teams.
Reply
#3

i'm not a pro scripter or other, i'm only a newby, so i don't know more function or other, any1 can explain me as well? here or on xfire or in PM.
xfire: martinlupen
Reply
#4

Italiano? :P
Reply
#5

Quote:
Originally Posted by TheLoolyWiz
Посмотреть сообщение
Italiano? :P
si xD
Reply
#6

How is it done in /scores ?
Reply
#7

I try with this:
Up:
Код:
new Text:risultato;
OnGameModeInit:
Код:
	risultato = TextDrawCreate(451 ,130 , "Score");
	TextDrawFont(risultato , 1);
	TextDrawLetterSize(risultato , 0.6, 4.2);
	TextDrawColor(risultato , 0xfaf5f5FF);
	TextDrawSetOutline(risultato , false);
	TextDrawSetProportional(risultato , true);
	TextDrawSetShadow(risultato , 1);
OnPlayerConnect:
Код:
	new risultato1[128];
	format(risultato1, sizeof(risultato1),"%d  /  %d",TeamRoundsWon[T_HOME],TeamRoundsWon[T_AWAY]);
	TextDrawSetString(risultato, risultato1);
	TextDrawShowForPlayer(playerid, risultato);
	return 1;
when i try to Compile i see only 1 Warning:
C:\Users\pc\Desktop\AAD con Risultati\gamemodes\AAD70.pwn(1504) : warning 225: unreachable code
The 1504 line is:
Код:
if(playerid >= MAX_SERVER_PLAYERS)return Kick(playerid);
anyway, when i try to enter in my server, i see on the right 0 / 0 (the scores) but the server crash :\
any solutions?
Reply
#8

What are you trying to check by doing that code!?
Reply
#9

only show (with a textdraw) the result of 2 team (on A/D) but when i try to connect on my server, all crash
Reply
#10

I meant this one.
pawn Код:
if(playerid >= MAX_SERVER_PLAYERS)return Kick(playerid);
I see no sense in this.
Remove it, and all should work fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)