countdown texdraw only for 1 player?
#1

hi,
as soon as u enter a checkpoint a texdraw appears that counts backwards from 15 to 0.
but this only happens for 1 player.
If another player enters the cp he doesnt see the textdraw.
I dont know why.
I also have to say that only a player that enters the cp shall see the countdown.

pawn Код:
new countdownzone = 15;
new Text:MiniCountdown;
forward counterzone(playerid);


MiniCountdown = TextDrawCreate(3.000000, 412.000000, "15");
TextDrawBackgroundColor(MiniCountdown, 255);
TextDrawFont(MiniCountdown, 3);
TextDrawLetterSize(MiniCountdown, 0.939999, 3.900000);
TextDrawColor(MiniCountdown, -1);
TextDrawSetOutline(MiniCountdown, 1);
TextDrawSetProportional(MiniCountdown, 1);
TextDrawUseBox(MiniCountdown, 0);
TextDrawBoxColor(MiniCountdown, 1684300900);
TextDrawTextSize(MiniCountdown, 41.000000, 0.000000);

public counterzone(playerid)
{

if(countdownzone > 0)
{
CDONZone = SetTimer("counterzone",990,false); //as soon as the player leaves the cp it kills the timer
new textformat[85];
format(textformat,sizeof textformat,"~g~%d",countdownzone);
TextDrawSetString(MiniCountdown,textformat);
TextDrawShowForPlayer(playerid,MiniCountdown);

countdownzone --;
}

return 1;
}
Reply


Messages In This Thread
countdown texdraw only for 1 player? - by BlackWolf120 - 27.12.2010, 22:41
Re: countdown texdraw only for 1 player? - by titanak - 27.12.2010, 23:34

Forum Jump:


Users browsing this thread: 1 Guest(s)