Textdraw problem
#1

So whenever the player spawns as team 1 or team 2 , it adds the count to team 1 ALWAYS.
Code:
new Text:AliveInfo;
Код:
	AliveInfo = TextDrawCreate(23.000000, 169.000000, "team 1 ALIVE: 0~n~team2 ALIVE: 0~n~~r~~W~");
	TextDrawBackgroundColor(AliveInfo, 255);
	TextDrawFont(AliveInfo, 1);
	TextDrawLetterSize(AliveInfo, 0.200000, 1.400000);
	TextDrawColor(AliveInfo, -1);
	TextDrawSetOutline(AliveInfo, 0);
	TextDrawSetProportional(AliveInfo, 1);
	TextDrawSetShadow(AliveInfo, 1);
	function OnServerUpdate()
{
		UpdateAliveInfo();

	return 1;
}
stock UpdateAliveInfo()
{
	new string[128];
	format(string,sizeof(string),"~r~Team1: %d~n~~g~Team2: %d~n~~p~FORUMS: WWW.xwy",GetTeamPlayersAlive(TEAM_ZOMBIE),GetTeamPlayersAlive(TEAM_HUMAN));
	TextDrawSetString(AliveInfo,string);
	return 1;
}
public OnPlayerSpawn(playerid)
{
 playersAliveCount++; 
// rest of code dont want to publish.
public OnPlayerDeath(playerid)
{
playersAliveCount--;
//rest of code
GetTeamPlayersAlive(teamid)
{
    new count;
    for(new i; i < playersAliveCount; i++)
    {
        if(IsPlayerConnected(i) && team[i] == teamid) count++;
    }
    return count;
}
Whats the problem here?
Reply


Messages In This Thread
Textdraw problem - by Crystallize - 02.01.2016, 23:05
Re: Textdraw problem - by Joron - 02.01.2016, 23:18
Re: Textdraw problem - by Crystallize - 02.01.2016, 23:24
Re: Textdraw problem - by Joron - 02.01.2016, 23:26
Re: Textdraw problem - by justinnater - 03.01.2016, 00:44
Re: Textdraw problem - by SickAttack - 03.01.2016, 01:06
Re: Textdraw problem - by Crystallize - 03.01.2016, 01:19
Re: Textdraw problem - by justinnater - 03.01.2016, 01:31
Re: Textdraw problem - by SickAttack - 03.01.2016, 02:28
Re: Textdraw problem - by Crystallize - 03.01.2016, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)