Stats TextDraw Bug
#3

Код:
/*
	**************************
	Filtsript version v3.3  **
	**************************
*/


#include <a_samp>


enum PlayerDB
{
	Kills,
	Deaths,
	bool:Box,
}
new PlayerData[MAX_PLAYERS][PlayerDB];
forward StatsInfromation();


new Text: PlayerStats[MAX_PLAYERS];
new Text: Textdraw1;



public OnFilterScriptInit()
{
	
	SetTimer("StatsInfromation",1000 , 1);
 	for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
 	{
	    PlayerStats[playerid] = TextDrawCreate(231.000000,405.000000,"-");
	    Textdraw1 = TextDrawCreate(260.000000,391.000000,"STATS");
	    TextDrawUseBox(PlayerStats[playerid],1);
	    TextDrawBoxColor(PlayerStats[playerid],0xffffff33);
	    TextDrawTextSize(PlayerStats[playerid],389.000000,119.000000);
	    TextDrawAlignment(PlayerStats[playerid],0);
	    TextDrawAlignment(Textdraw1,0);
	    TextDrawBackgroundColor(PlayerStats[playerid],0x000000ff);
	    TextDrawBackgroundColor(Textdraw1,0xff000033);
	    TextDrawFont(PlayerStats[playerid],2);
	    TextDrawLetterSize(PlayerStats[playerid],0.399999,1.200000);
	    TextDrawFont(Textdraw1,2);
	    TextDrawLetterSize(Textdraw1,0.799999,1.300000);
	    TextDrawColor(PlayerStats[playerid],0xffffffff);
	    TextDrawColor(Textdraw1,0xffffffff);
	    TextDrawSetOutline(PlayerStats[playerid],1);
	    TextDrawSetOutline(Textdraw1,1);
	    TextDrawSetProportional(PlayerStats[playerid],1);
	    TextDrawSetProportional(Textdraw1,1);
	    TextDrawSetShadow(PlayerStats[playerid],1);
	    TextDrawSetShadow(Textdraw1,1);

	}
	return 1;
}

//______________________________________________________________________________
public OnFilterScriptExit()
{
    for(new i = 0;i < MAX_PLAYERS; i++)
    {
        TextDrawDestroy(PlayerStats[i]);
    }
    TextDrawDestroy(Textdraw1);
	return 1;
}
//______________________________________________________________________________
public OnPlayerConnect(playerid)
{


	TextDrawShowForPlayer(playerid, PlayerStats[playerid]);
	TextDrawShowForPlayer(playerid, Textdraw1);

	return 1;
}
//______________________________________________________________________________



//______________________________________________________________________________
public StatsInfromation()
{
    new str[128];
	for(new i=0;i<MAX_PLAYERS;i++)
	{
		if (IsPlayerConnected(i))
	    {
	        format(str, sizeof(str), "Kills: %d - Deaths: %d" , PlayerData[i][Kills], PlayerData[i][Deaths]);
	        TextDrawSetString(PlayerStats[i],str);
    	}
	}
	return 1;
}
//______________________________________________________________________________
//                            2009/2010 ©
Reply


Messages In This Thread
Stats TextDraw Bug [+REP's!] - by SPA - 25.06.2014, 15:32
Re: Stats TextDraw Bug - by RenovanZ - 25.06.2014, 15:35
Re: Stats TextDraw Bug - by SPA - 25.06.2014, 15:47
Re: Stats TextDraw Bug - by RenovanZ - 25.06.2014, 15:58
Respuesta: Stats TextDraw Bug - by SickAttack - 25.06.2014, 16:08
Re: Stats TextDraw Bug - by SPA - 25.06.2014, 16:13
Re: Respuesta: Stats TextDraw Bug - by SPA - 25.06.2014, 16:45
Re: Respuesta: Stats TextDraw Bug - by RenovanZ - 25.06.2014, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)