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
#2

HELP!
Reply
#3

Can you show me the TextDraw ?
Reply
#4

DONE!
Reply
#5

not sure but try converting it to player text draws
Reply
#6

Well this:
pawn Код:
TextDrawSetString(Text:LoggedInAs[playerid], string);
Should be:
pawn Код:
TextDrawSetString(LoggedInAs[playerid], string);
Reply
#7

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
Well this:
pawn Код:
TextDrawSetString(Text:LoggedInAs[playerid], string);
Should be:
pawn Код:
TextDrawSetString(LoggedInAs[playerid], string);
Ok thanks, i will try !
Reply
#8

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
Well this:
pawn Код:
TextDrawSetString(Text:LoggedInAs[playerid], string);
Should be:
pawn Код:
TextDrawSetString(LoggedInAs[playerid], string);
This does not helped again text destroyed after 1 day.
Reply
#9

maybe the the textdraw limit is exeeding not because of this but because of some other textdraw in server
Reply
#10

I'v 2 textdraws only which are static
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)