Stats TextDraw HELP :(
#1

Hi,
i'v stats textdraw (Kills deaths etc..) , well its working fine ,but after few hours it's disappear , some guy saied that because i must destroy it to avoid exced (limits) , i did that but it still disappear after few hours, anyone can help please


Код:
//stats
new Text:LoggedInAs[MAX_PLAYERS];
public OnPlayerDeath(playerid,killerid,reason)
{
	CheckLoggedInAs(playerid);
	if(killerid != INVALID_PLAYER_ID)
	{
	    CheckLoggedInAs(killerid);
	}
	return 1;
}
public OnFilterScriptExit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
        TextDrawDestroy(LoggedInAs[i]);
	}
}

public OnPlayerConnect(playerid)
{

    LoggedInAs[playerid] = TextDrawCreate(300.5,6, "www.spa-server.net");
    TextDrawBackgroundColor(LoggedInAs[playerid], 255);
    TextDrawFont(LoggedInAs[playerid], 3);
    TextDrawLetterSize(LoggedInAs[playerid], 0.350000, 1.000000);
    TextDrawColor(LoggedInAs[playerid], -5046017);
    TextDrawSetOutline(LoggedInAs[playerid], 0);
    TextDrawSetProportional(LoggedInAs[playerid], 1);
    TextDrawSetShadow(LoggedInAs[playerid], 1);
    TextDrawSetSelectable(LoggedInAs[playerid], 0);
    CheckLoggedInAs(playerid);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    TextDrawDestroy(LoggedInAs[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
    CheckLoggedInAs(playerid);
    TextDrawShowForPlayer(playerid,LoggedInAs[playerid]);
return 1;
}
stock CheckLoggedInAs(playerid)
{
/*	if(pInfo[playerid][Kills] >= 1000) Rank[ playerid ] = 6;
	else if(pInfo[playerid][Kills] >= 700) Rank[ playerid ] = 5;
	else if(pInfo[playerid][Kills] >= 500) Rank[ playerid ] = 4;
	else if(pInfo[playerid][Kills] >= 200) Rank[ playerid ] = 3;
	else if(pInfo[playerid][Kills] >= 100) Rank[ playerid ] = 2;
	else if(pInfo[playerid][Kills] >= 10) Rank[ playerid ] = 1;
	else if(pInfo[playerid][Kills] >= 0) Rank[ playerid ] = 0;*/

	new string[450];
	format(string, sizeof(string), "~g~Kills: %d ~W~- ~r~Deaths: %d ~W~- ~y~DM Score: %d",pInfo[playerid][Kills],pInfo[playerid][Deaths],GetPlayerScore(playerid));
 	TextDrawSetString(Text:LoggedInAs[playerid], string);
	return 1;
}
Reply


Messages In This Thread
Stats TextDraw HELP :( - by SPA - 08.07.2014, 22:12
Re: Stats TextDraw HELP :( - by SPA - 08.07.2014, 23:29
Re : Stats TextDraw HELP :( - by Clad - 08.07.2014, 23:35
Re: Stats TextDraw HELP :( - by SPA - 08.07.2014, 23:58
Re: Stats TextDraw HELP :( - by BroZeus - 09.07.2014, 07:08
Re: Stats TextDraw HELP :( - by Jack_Leslie - 09.07.2014, 07:35
Re: Stats TextDraw HELP :( - by SPA - 09.07.2014, 21:22
Re: Stats TextDraw HELP :( - by SPA - 11.07.2014, 10:11
Re: Stats TextDraw HELP :( - by BroZeus - 11.07.2014, 11:55
Re: Stats TextDraw HELP :( - by SPA - 11.07.2014, 11:59

Forum Jump:


Users browsing this thread: 3 Guest(s)