new Timer_Golpeado[MAX_PLAYERS];
new Text:TextdrawGolpeado;
TextdrawGolpeado= TextDrawCreate(70.000000, 217.000000, "-");
TextDrawBackgroundColor(TextdrawGolpeado, 120);
TextDrawFont(TextdrawGolpeado, 3);
TextDrawLetterSize(TextdrawGolpeado, 2.429999, 16.100000);
TextDrawColor(TextdrawGolpeado, -16776961);
TextDrawSetOutline(TextdrawGolpeado, 1);
TextDrawSetProportional(TextdrawGolpeado, 0);
TextDrawSetSelectable(TextdrawGolpeado, 0);
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
TextDrawShowForPlayer(playerid, TextdrawCombate);
Info[playerid][pCombate] = 1;
Timer_Golpeado[playerid] = SetTimerEx("Golpeado", 60000, true, "i", playerid);
return 1;
}
forward Golpeado(playerid);
public Golpeado(playerid)
{
TextDrawHideForPlayer(playerid, TextdrawGolpeado);
KillTimer(Timer_Golpeado[playerid]);
return 1;
}
Arrancas el timer Timer_Parpadeo y luego matas el Timer_Golpeado, ї Y cuando matas al Timer_Parpadeo?
|
OFF: eh una pregunta: que obsesiуn tienes con el vнdeo de ayer culie versiуn samp? D: hasta en tu firma esta que enfermo estas loco D: sali un poco a tomar aire jajaja D:
PS: no te creas mucho usando traductor de binarios ^^ ON: por que no mejor haces una variable para detectar si esta golpeando o no? a si si golpea 1 vez no se repite el timer 2 veces (2 veces golpeaste 2 veces se ejecuta, es un ejemplo), entonces haz que si golpeas 1 vez comienze el timer y has una restricciуn de que si ya has golpeado 1 o mas veces no se ejecute el timer es todo (o bien puedes matarlo y crearlo)... |
new Timer_Golpeado[MAX_PLAYERS];
new Text:TextdrawGolpeado;
TextdrawGolpeado= TextDrawCreate(70.000000, 217.000000, "-");
TextDrawBackgroundColor(TextdrawGolpeado, 120);
TextDrawFont(TextdrawGolpeado, 3);
TextDrawLetterSize(TextdrawGolpeado, 2.429999, 16.100000);
TextDrawColor(TextdrawGolpeado, -16776961);
TextDrawSetOutline(TextdrawGolpeado, 1);
TextDrawSetProportional(TextdrawGolpeado, 0);
TextDrawSetSelectable(TextdrawGolpeado, 0);
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid){
if(playerid != INVALID_PLAYER_ID){
TextDrawHideForPlayer(playerid, TextdrawGolpeado);
Info[playerid][pCombate] = 1;
KillTimer(Timer_Golpeado[playerid]);
Timer_Golpeado[playerid] = SetTimerEx("Golpeado", 60*1000, true, "i", playerid);
TextDrawShowForPlayer(playerid, TextdrawCombate);
}
return true;
}
forward Golpeado(playerid); public Golpeado(playerid){
TextDrawHideForPlayer(playerid, TextdrawGolpeado);
KillTimer(Timer_Golpeado[playerid]);
Info[playerid][pCombate] = 0;
return true;
}