08.07.2014, 22:12
(
Последний раз редактировалось SPA; 08.07.2014 в 23:57.
)
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
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; }