lundi 22 septembre 2014

Problema con TextDraw

Hola amigos aquí con un pequeño problema con mis textdraw.. como puedo hacer que el mensaje se repita constantemente cuando le disparan.... Mi función primeramente.




pawn Code:




new strCombate[128];

new Text:Combate1;



public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)

{

if(issuerid != INVALID_PLAYER_ID)

{

SetTimerEx("MCombate", 15000, false,"i",playerid);

TextDrawShowForPlayer(playerid,Combate1);

format(strCombate, sizeof(strCombate), "Entrastes en ~r~MODO DE COMBATE~W~. No pongas pausa ni salgas del juego. ~n~Tu expericia subira si entras en ~r~MODO COMBATE~W~."); // Se lo mandamos a quien recibe el daño

TextDrawSetString(Combate1,strCombate);

}

return 1;

}



forward MCombate(playerid);

public MCombate(playerid)

{

TextDrawDestroy(Combate1);

}



public OnGameModeInit()

{

Combate1 = TextDrawCreate(184.000000, 367.000000, " ");

TextDrawBackgroundColor(Combate1, 255);

TextDrawFont(Combate1, 1);

TextDrawLetterSize(Combate1, 0.300000, 1.200000);

TextDrawColor(Combate1, -1);

TextDrawSetOutline(Combate1, 1);

TextDrawSetProportional(Combate1, 1);

return 1;

}





pero el problema es que si pongo:




pawn Code:




TextDrawHideForPlayer(Combate1);



El textdraw no desaparece aun asi no le disparen



pero si pongo.




pawn Code:




TextDrawDestroy(Combate1);



el mensaje desaparece y ya no vuelvo aparecer... como podría hacer para que mis mensajes sean continuos cada ves que le disparen aparezca ese mensaje, no se si existes timer que reinicie el tiempo cada vez que termine un secuencia, y si alguien siguen disparando vuelva aparecer el mensaje.



Una imagen de lo que hablo.



gracias




Aucun commentaire:

Enregistrer un commentaire