[Problema] Sobre Textdraws
#1

Bueno Hola ha todos, tengo un ligro problema desde hace tiempo, desde la version 0.3x
En mi servidor uso muchos textdraws, Clickeables y para dar una funcion con un format, definiendolos 1 por cada player
usando [MAX_PLAYERS] - [playerid]

El problema esque despues de un tiempo nose cuanto, quizas horas y con varios users los textdraws se daсan
por ejemplo hice uno clikeable para un juego si ejecutas no se muestra nada, solo te deja como si estbiera para clickear, tengo uno que mide Fsp y otro la vida (Health) tambiйn desaparecen, nose a que se debe que se vayan
Nose si son ataques o el host es malo, los textdraws estan biйn dejare, como esta el OnplayerUpdate ya que alli es donde creo que pudiera Generar el Bug ese.

FS solo uso 1 y no estoy usando OnplayerUpdate

aca mi Update


Код:
public OnPlayerUpdate(playerid)
{
new string[128];
new FPSSS = GetPlayerDrunkLevel(playerid), fps; if (FPSSS < 100) { SetPlayerDrunkLevel(playerid, 2000); } else { if (FPSSS != FPSS[playerid]) { fps = FPSS[playerid] - FPSSS; if (fps > 0 && fps < 200) FPS[playerid] = fps; FPSS[playerid] = FPSSS; } }
format(string,sizeof(string), "%d",FPS[playerid]); TextDrawSetString(Text:TextdeFps[playerid],string);

if(IsPlayerConnected(playerid))//Esta conectado
{
if(IsPlayerNPC(playerid)) return 0;
GetPlayerHealth(playerid, vida[playerid]);
format(string, sizeof(string), "%.1f", vida[playerid]);//Vida
TextDrawSetString(Text:Health[playerid], string);
}
//Anti cheat seguridad
	#if defined AntiBot 1
 //Detecta el Ping, y si el maximo es el marcado (Default: 3000MS), Lo Expulsa
	if(GetPlayerPing(playerid) >= 3000)
	{
	new string[128];
	format(string, sizeof(string), "* {808080}El jugador %s fue kickeado » PingFlood/Bots",PlayerName2(playerid));
	SendClientMessageToAll(Seguridad_Color, string);
	Elkick(playerid);
	return 1;
	}
	#endif

	#if defined AntiVisoresBug 1
    if((GetPlayerWeapon(playerid) == 44 || GetPlayerWeapon(playerid) == 45) && !IsPlayerInAnyVehicle(playerid))
    {
    new keys, ud, lr;
    GetPlayerKeys(playerid, keys, ud, lr);
    if(keys & KEY_FIRE)
    {
    format(string2, sizeof(string2), "* {C0C0C0}El jugador %s fue kickeado » Thermal Goggles",PlayerName2(playerid));
    SendClientMessageToAll(Seguridad_Color, string2);
    Elkick(playerid);
    return 0;
    }
    return 1;
    }
    #endif
    return 1;
}

No creo que sea eso, veo todo bien, el host que uso es (Removida por mi)
espero una explicacion, si ha alguien ya le paso y como lo reparo, ha y estoy usando


TextDrawCreate, Quiza solo deba cambiar ha CreatePlayerTextDraw
Reply
#2

Lindo Spam, por cierto pasanos la parte donde creas los textdraws
Reply
#3

pasa la callback OnPlayerClickTextDraw. . .
Reply
#4

Lo siento el spam, no fue apropocito, mire a varios hacerlo y crei que no pasaria nada

En la vieja version de mi servidor uso pocos textdraws como el de los Fps
Ping, Etc usando PlayerText: y el sv ha llegado ha los 100/100 sin problemas. en cambio la nueva version donde ahora uso mas textdraws, salio ese problema, y aqui ya uso los Text: y no PlayerText:


he pensado en cambiar los mas importantes ha PlayerText:

Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == SalirCreditos)
{
TextDrawHideForPlayer(playerid, BoxCreditos);
TextDrawHideForPlayer(playerid, InfoCreditos);
TextDrawHideForPlayer(playerid, SalirCreditos);
TextDrawHideForPlayer(playerid,TVCAM_CornerTopLeft);
TextDrawHideForPlayer(playerid,TVCAM_CornerTopRight);
TextDrawHideForPlayer(playerid,TVCAM_CornerBottomLeft);
TextDrawHideForPlayer(playerid,TVCAM_CornerBottomRight);
KillTimer(SoundAndTextTimer[playerid]);
TextDrawHideForPlayer(playerid,MOTD[playerid]);
TextDrawShowForPlayer(playerid, BarraDeAdmin);
TextDrawShowForPlayer(playerid, TextDeMinimapa);
TextDrawShowForPlayer(playerid, BarraDeinformacion);
TextDrawShowForPlayer(playerid, TextBambi);
TextDrawShowForPlayer(playerid, players);
TextDrawShowForPlayer(playerid, Text:BarraEstadisticas[playerid]);
TextDrawShowForPlayer(playerid, Text:Health[playerid]);
TextDrawShowForPlayer(playerid, Text:Armour[playerid]);
TextDrawShowForPlayer(playerid, Text:IconoMano);
TextDrawShowForPlayer(playerid, Text:TextdeFps[playerid]);
TextDrawShowForPlayer(playerid, UnoC);
TextDrawShowForPlayer(playerid, DosC);
TextDrawShowForPlayer(playerid, TresC);
TextDrawShowForPlayer(playerid, CuatroC);
TextDrawShowForPlayer(playerid, SincoC);
TextDrawShowForPlayer(playerid, Seis6);
TextDrawShowForPlayer(playerid, SieteC);
TextDrawShowForPlayer(playerid, OchoC);
TextDrawShowForPlayer(playerid, NueveC);
TextDrawShowForPlayer(playerid, OnceC);
TextDrawShowForPlayer(playerid, DiezC);
TextDrawShowForPlayer(playerid, ZonaZeroPro);
PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
CancelSelectTextDraw(playerid);
}
//--- Musica
else if(clickedid == TrianguloM[playerid])
{
StopAudioStreamForPlayer(playerid);
PlayerPlaySound(playerid,6003,0.0,0.0,0.0);
new RandomMusica = random(32);
if(RandomMusica == 0){PlayAudioStreamForPlayer(playerid, "http://austintownhall.com/wp-content/uploads/2008/12/itwasagoodday.mp3");}//Rm
else if(RandomMusica == 1){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/545t.mp3");}//Srueck
else if(RandomMusica == 2){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/645o.mp3");}//Family Wyent
else if(RandomMusica == 3){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/636q.mp3");}//A/D reemplazado por Beat Box
else if(RandomMusica == 4){PlayAudioStreamForPlayer(playerid, "http://www.chinaskateboards.cn/UploadFile/200771114012454.mp3");}
else if(RandomMusica == 5){PlayAudioStreamForPlayer(playerid, "http://quietcolor.com/media/mp3/2009_1/Friday.mp3");}
else if(RandomMusica == 6){PlayAudioStreamForPlayer(playerid, "http://hillside-bullyz.com/media/Biggie_Smalls_-_Big_PaPa.mp3");}
else if(RandomMusica == 7){PlayAudioStreamForPlayer(playerid, "http://fuzi0n.free.fr/Notorious%20BIG%20-%20Juicy.mp3");}
else if(RandomMusica == 8){PlayAudioStreamForPlayer(playerid, "http://8106.tv/blog/audio/2009_02/money/04.mp3");}
else if(RandomMusica == 9){PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_lpdzm33aFf1qgw1r9o1.mp3");}
else if(RandomMusica == 10){PlayAudioStreamForPlayer(playerid, "http://api.ning.com/files/lGusU0wbPXS10DwpJ79getmQJHHekhxnvokOtYexbNpkVmTYznxHINqIz6ezZqRAe4krFnR4v2H2niu1ebW219jFY3xM9jfL/ip9-d6Snfq6Xo5iKmZCKoZdoqJaja5G2nnaEWDU$.mp3");}
else if(RandomMusica == 11){PlayAudioStreamForPlayer(playerid, "http://prestige86.allmyblog.com/images/prestige86/prestige86_20060414_135940.mp3");}
else if(RandomMusica == 12){PlayAudioStreamForPlayer(playerid, "http://passionweiss.com/wp-content/uploads/2008/09/1-12-hit-em-up-1.mp3");}
else if(RandomMusica == 13){PlayAudioStreamForPlayer(playerid, "http://www.physics.sfsu.edu/~jgregory/life_shift/new/res/mp3s/Love_Is.mp3");}
else if(RandomMusica == 14){PlayAudioStreamForPlayer(playerid, "http://media.youthoutlook.org/audio/Common%20-The%20Light.mp3");}
else if(RandomMusica == 15){PlayAudioStreamForPlayer(playerid, "http://208.93.192.103/featuredAudio/17248.mp3");}
else if(RandomMusica == 16){PlayAudioStreamForPlayer(playerid, "http://damzikc.free.fr/Site/50%20cent/50%20Cent%20-%20Best%20Friends.mp3");}//Aqui termina el rap
else if(RandomMusica == 17){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/12%20Hasta%20El%20Final.mp3");}
else if(RandomMusica == 18){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/11%20Miedo%20A%20Las%20Alturas.mp3");}
else if(RandomMusica == 19){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/06%20Solo%20a%20terceros.mp3");}
else if(RandomMusica == 20){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/Amiguito.mp3");}
else if(RandomMusica == 21){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/07%20Abigail.mp3");}
else if(RandomMusica == 22){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock3/Adam's%20Song.mp3");}
else if(RandomMusica == 23){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock3/05%20Turn%20It%20Off.mp3");}
else if(RandomMusica == 24){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock3/08-paramore%20-%20crushcrushcrush.mp3");}
else if(RandomMusica == 25){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/12%20Decode.mp3");}
else if(RandomMusica == 26){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/Las%20Resort.mp3");}
else if(RandomMusica == 26){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/01%20What%20I've%20done.mp3");}
else if(RandomMusica == 27){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/6hc8.mp3");}//Mi Life belike
else if(RandomMusica == 28){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Metal/heartwork.mp3");}
else if(RandomMusica == 29){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Metal/Frantic-Metallica.mp3");}
else if(RandomMusica == 30){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Regaeton/Dutty%20love-Don%20omar.mp3");}
else if(RandomMusica == 31){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/6hc8.mp3");}//My life be like
GameTextForPlayer(playerid,"_~n~_~n~~b~Play Musica",3000,6);
TextDrawHideForPlayer(playerid, MusicaBOX[playerid]);
TextDrawHideForPlayer(playerid, TrianguloM[playerid]);
TextDrawHideForPlayer(playerid, SiguienteM[playerid]);
TextDrawHideForPlayer(playerid, SalirMusicaM[playerid]);
TextDrawHideForPlayer(playerid, TemaM[playerid]);
CancelSelectTextDraw(playerid);
}

else if(clickedid == SiguienteM[playerid])
{
StopAudioStreamForPlayer(playerid);
PlayerPlaySound(playerid,6003,0.0,0.0,0.0);
new RandomMusica = random(32);
if(RandomMusica == 0){PlayAudioStreamForPlayer(playerid, "http://austintownhall.com/wp-content/uploads/2008/12/itwasagoodday.mp3");}//Rm
else if(RandomMusica == 1){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/545t.mp3");}//Srueck
else if(RandomMusica == 2){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/645o.mp3");}//Family Wyent
else if(RandomMusica == 3){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/636q.mp3");}//A/D reemplazado por Beat Box
else if(RandomMusica == 4){PlayAudioStreamForPlayer(playerid, "http://www.chinaskateboards.cn/UploadFile/200771114012454.mp3");}
else if(RandomMusica == 5){PlayAudioStreamForPlayer(playerid, "http://quietcolor.com/media/mp3/2009_1/Friday.mp3");}
else if(RandomMusica == 6){PlayAudioStreamForPlayer(playerid, "http://hillside-bullyz.com/media/Biggie_Smalls_-_Big_PaPa.mp3");}
else if(RandomMusica == 7){PlayAudioStreamForPlayer(playerid, "http://fuzi0n.free.fr/Notorious%20BIG%20-%20Juicy.mp3");}
else if(RandomMusica == 8){PlayAudioStreamForPlayer(playerid, "http://8106.tv/blog/audio/2009_02/money/04.mp3");}
else if(RandomMusica == 9){PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_lpdzm33aFf1qgw1r9o1.mp3");}
else if(RandomMusica == 10){PlayAudioStreamForPlayer(playerid, "http://api.ning.com/files/lGusU0wbPXS10DwpJ79getmQJHHekhxnvokOtYexbNpkVmTYznxHINqIz6ezZqRAe4krFnR4v2H2niu1ebW219jFY3xM9jfL/ip9-d6Snfq6Xo5iKmZCKoZdoqJaja5G2nnaEWDU$.mp3");}
else if(RandomMusica == 11){PlayAudioStreamForPlayer(playerid, "http://prestige86.allmyblog.com/images/prestige86/prestige86_20060414_135940.mp3");}
else if(RandomMusica == 12){PlayAudioStreamForPlayer(playerid, "http://passionweiss.com/wp-content/uploads/2008/09/1-12-hit-em-up-1.mp3");}
else if(RandomMusica == 13){PlayAudioStreamForPlayer(playerid, "http://www.physics.sfsu.edu/~jgregory/life_shift/new/res/mp3s/Love_Is.mp3");}
else if(RandomMusica == 14){PlayAudioStreamForPlayer(playerid, "http://media.youthoutlook.org/audio/Common%20-The%20Light.mp3");}
else if(RandomMusica == 15){PlayAudioStreamForPlayer(playerid, "http://208.93.192.103/featuredAudio/17248.mp3");}
else if(RandomMusica == 16){PlayAudioStreamForPlayer(playerid, "http://damzikc.free.fr/Site/50%20cent/50%20Cent%20-%20Best%20Friends.mp3");}//Aqui termina el rap
else if(RandomMusica == 17){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/12%20Hasta%20El%20Final.mp3");}
else if(RandomMusica == 18){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/11%20Miedo%20A%20Las%20Alturas.mp3");}
else if(RandomMusica == 19){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/06%20Solo%20a%20terceros.mp3");}
else if(RandomMusica == 20){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/Amiguito.mp3");}
else if(RandomMusica == 21){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock2/07%20Abigail.mp3");}
else if(RandomMusica == 22){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock3/Adam's%20Song.mp3");}
else if(RandomMusica == 23){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock3/05%20Turn%20It%20Off.mp3");}
else if(RandomMusica == 24){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/6hc8.mp3");}//My lige be like
else if(RandomMusica == 25){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/12%20Decode.mp3");}
else if(RandomMusica == 26){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/Las%20Resort.mp3");}
else if(RandomMusica == 26){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/01%20What%20I've%20done.mp3");}
else if(RandomMusica == 27){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Rock4/07%20Thank%20for%20the%20memories.mp3");}
else if(RandomMusica == 28){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Metal/heartwork.mp3");}
else if(RandomMusica == 29){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Metal/Frantic-Metallica.mp3");}
else if(RandomMusica == 30){PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/68684795/M%C3%BAsica/Regaeton/Dutty%20love-Don%20omar.mp3");}
else if(RandomMusica == 31){PlayAudioStreamForPlayer(playerid, "http://dl.soundowl.com/6hc8.mp3");}//Mi life be like
GameTextForPlayer(playerid,"_~n~_~n~~p~Siguiente",3000,6);
TextDrawHideForPlayer(playerid, MusicaBOX[playerid]);
TextDrawHideForPlayer(playerid, TrianguloM[playerid]);
TextDrawHideForPlayer(playerid, SiguienteM[playerid]);
TextDrawHideForPlayer(playerid, SalirMusicaM[playerid]);
TextDrawHideForPlayer(playerid, TemaM[playerid]);
CancelSelectTextDraw(playerid);
}

else if(clickedid == TemaM[playerid])
{
StopAudioStreamForPlayer(playerid);
ShowPlayerDialog(playerid,InsertarLink,DIALOG_STYLE_INPUT," ","{0080C0}Info: {FFFFFF}Inserta el link {FF8000}.mp3 {FFFFFF}para reproducir tu canciуn\nrecuerda que los links de you tube no seran leidos\npuedes usar {0080C0}www.offliberty.com {ffffff}para reproducir tu canciуn","Play","Salir");
PlayerPlaySound(playerid,6003,0.0,0.0,0.0);
TextDrawHideForPlayer(playerid, MusicaBOX[playerid]);
TextDrawHideForPlayer(playerid, TrianguloM[playerid]);
TextDrawHideForPlayer(playerid, SiguienteM[playerid]);
TextDrawHideForPlayer(playerid, SalirMusicaM[playerid]);
TextDrawHideForPlayer(playerid, TemaM[playerid]);
CancelSelectTextDraw(playerid);
}

else if(clickedid == SalirMusicaM[playerid])
{
StopAudioStreamForPlayer(playerid);
PlayerPlaySound(playerid,6003,0.0,0.0,0.0);
GameTextForPlayer(playerid,"_~n~_~n~~r~Musica ~y~apagada",3000,6);
TextDrawHideForPlayer(playerid, MusicaBOX[playerid]);
TextDrawHideForPlayer(playerid, TrianguloM[playerid]);
TextDrawHideForPlayer(playerid, SiguienteM[playerid]);
TextDrawHideForPlayer(playerid, SalirMusicaM[playerid]);
TextDrawHideForPlayer(playerid, TemaM[playerid]);
CancelSelectTextDraw(playerid);
}

return 1;//El Return del Public
}
Y el comienzo de cada textdraw, como el de FPS es asн

new Text:BarraEstadisticas[MAX_PLAYERS],Text:Health[MAX_PLAYERS],Text:Armour[MAX_PLAYERS],Text:IconoMano,Text:TextdeFps[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)