PDA

View Full Version : TextDraw doesn't appear


Bearfist
31/08/2011, 08:01 PM
The following Code shouldn't be right at one part I can't detect ...


public BestPlayerTimer()
{
new LastBestPlayer;
for(new i = 0; i < MAX_PLAYERS; i++)
{
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsPlayerConnected(i) && IsPlayerConnected(j))
{
//-------------------------GunGame----------------------------------------------------
if(IsInGunGame[i] && IsInGunGame[j])
{
if(KillScore[i] > KillScore[j])
{
new String[100];
new String2[100];

LastBestPlayer = i;

RanksRemaining[j] = rank[i] - rank[j];
RanksLeading[i] = rank[i] - rank[j];

format(String, sizeof(String), "You are %d Rank(s) behind the Leader!", RanksRemaining[j]);
RRemaining[j] = TextDrawCreate(340.0,380.0, String);
TextDrawColor(RRemaining[j],COLOR_YELLOW);
TextDrawFont(RRemaining[j],2);
TextDrawSetProportional(RRemaining[j],1);
TextDrawSetShadow(RRemaining[j],1);
TextDrawShowForPlayer(j, RRemaining[j]);
TextDrawHideForPlayer(j, RLeading[j]);
TextDrawHideForPlayer(j, NRemaining[j]);

format(String2, sizeof(String2), "You are Leading with %d Rank(s)!", RanksLeading[i]);
RLeading[i] = TextDrawCreate(340.0,380.0, String2);
TextDrawShowForPlayer(i, RLeading[i]);
TextDrawHideForPlayer(i, RRemaining[i]);
TextDrawHideForPlayer(i,NRemaining[i]);

if((i++) == 1)
{
NRemaining[i] = TextDrawCreate(340.0,380.0, "You are 0 Rank(s) behind the Leader");
TextDrawColor(NRemaining[i],COLOR_YELLOW);
TextDrawFont(NRemaining[i],2);
TextDrawSetProportional(NRemaining[i],1);
TextDrawSetShadow(NRemaining[i],1);
TextDrawShowForPlayer(i, NRemaining[i]);

TextDrawHideForPlayer(i, RRemaining[i]);
TextDrawHideForPlayer(i, RLeading[i]);
}
}
}
//------------------------------------------------------------------------
}
}
}
}


Pawno doesn't show Errors.

Bearfist

Swyft
31/08/2011, 09:16 PM
The following Code shouldn't be right at one part I can't detect ...


public BestPlayerTimer()
{
new LastBestPlayer;
for(new i = 0; i < MAX_PLAYERS; i++)
{
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsPlayerConnected(i) && IsPlayerConnected(j))
{
//-------------------------GunGame----------------------------------------------------
if(IsInGunGame[i] && IsInGunGame[j])
{
if(KillScore[i] > KillScore[j])
{
new String[100];
new String2[100];

LastBestPlayer = i;

RanksRemaining[j] = rank[i] - rank[j];
RanksLeading[i] = rank[i] - rank[j];

format(String, sizeof(String), "You are %d Rank(s) behind the Leader!", RanksRemaining[j]);
RRemaining[j] = TextDrawCreate(340.0,380.0, String);
TextDrawColor(RRemaining[j],COLOR_YELLOW);
TextDrawFont(RRemaining[j],2);
TextDrawSetProportional(RRemaining[j],1);
TextDrawSetShadow(RRemaining[j],1);
TextDrawShowForPlayer(j, RRemaining[j]);
TextDrawHideForPlayer(j, RLeading[j]);
TextDrawHideForPlayer(j, NRemaining[j]);

format(String2, sizeof(String2), "You are Leading with %d Rank(s)!", RanksLeading[i]);
RLeading[i] = TextDrawCreate(340.0,380.0, String2);
TextDrawShowForPlayer(i, RLeading[i]);
TextDrawHideForPlayer(i, RRemaining[i]);
TextDrawHideForPlayer(i,NRemaining[i]);

if((i++) == 1)
{
NRemaining[i] = TextDrawCreate(340.0,380.0, "You are 0 Rank(s) behind the Leader");
TextDrawColor(NRemaining[i],COLOR_YELLOW);
TextDrawFont(NRemaining[i],2);
TextDrawSetProportional(NRemaining[i],1);
TextDrawSetShadow(NRemaining[i],1);
TextDrawShowForPlayer(i, NRemaining[i]);

TextDrawHideForPlayer(i, RRemaining[i]);
TextDrawHideForPlayer(i, RLeading[i]);
}
}
}
//------------------------------------------------------------------------
}
}
}
}


Pawno doesn't show Errors.

Bearfist

I had the same problem as you, it was just your placing of it

12.000000, 426.000000 - Bottom Right Corner

Here this is what I have for my things it is not like yours but you can use the Coordinates for it


////////////////////////TextDraws///////////////////////////////////////////////
Textdraw0 = TextDrawCreate(12.000000, 426.000000, "Furious Drifters");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.539999, 2.200000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);

Textdraw1 = TextDrawCreate(480.000000, 424.000000, "--IP NOT BEING SHOWN--");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.500000, 2.399999);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
////////////////////////////////////////////////////////////////////////////////

Bearfist
01/09/2011, 01:48 PM
thanks it worked =), but only in that way that a textdraw which wasn't shown before is now shown ...

The Textdraws doesn't seem to be reached ... is there anything wrong before the textdraws, that the textdraws doesn't get perfomed?

Greetings, Bearfist