a_td "Little include to TextDraw's" -
Daewoo - 11.11.2014
Hi.
I present you my first include: a_td
This include add animate/fade TextDraw color.
Big update ! i fix big bug ! please update include
Download:
Download a_td.inc
Features:
Код:
TextDrawFade(Text:id, delay=5, r, g, b, a, r2, g2, b2, a2, ColorFade, playerid=-1, bool:hide=false);
Parameters:- Text:id - id textdraw to be animated.
- delay - animation speed (preferably 5).
- r, g, b, a - start color.
- r2, g2, b2, a2 - end color.
- ColorFade - type animation see down.
- playerid - if it is set -1 and hide=true it TextDraw after the animation will be hidden all, otherwise only one player.
- bool:hide - Set to true if you want to hide the TD at the end of the animation, set false to the end of the animation had to hide TD.
Код:
PlayerTextDrawFade(playerid, PlayerText:id, delay=5, r, g, b, a, r2, g2, b2, a2, ColorFade, bool:hide=false);
Parameters:- playerid - Player id which is to do animation.
- Text:id - id textdraw to be animated.
- delay - animation speed (preferably 5).
- r, g, b, a - start color.
- r2, g2, b2, a2 - end color.
- ColorFade - type animation see down.
- bool:hide - Set to true if you want to hide the TD at the end of the animation, set false to the end of the animation had to hide TD.
ColorFade type:
Код:
#define FADE_COLOR_FONT 0 //Animate TextDraw Font
#define FADE_COLOR_BOX 1 //Animate TextDraw Box
Callbacks:
Код:
OnTextDrawFadeInit(Text:id, delay, r, g, b, a, r2, g2, b2, a2, ColorFade, playerid, bool:hide);
Returns:- Text:id - return the TextDraw id which has been animated.
- delay - return the delay
- r, g, b, a - return a color that has textdraw.
- r2, g2, b2, a2 - return a color that has textdraw after the animation
- ColorFade - return a fade type (Look Up)
- playerid - returns the id of the player who started animations. -1 all
- bool:hide - return or textdraw to be tucked away at the end of the animation
Код:
OnTextDrawFadeEnd(Text:id, playerid, delay, bool:hide, ColorFade);
[u]
Returns:[u]
- Text:id - return the id textdraw who finished animations
- playerid - return the delay
- hide - return or textdraw to be tucked away at the end of the animation
- ColorFade - return a fade type (Look Up)
Код:
OnPlayerTextDrawFadeInit(playerid, PlayerText:id, delay=5, r, g, b, a, r2, g2, b2, a2, ColorFade, bool:hide=false);
The same as OnTextDrawFadeInit, but for Playertextdraws.
Код:
OnPlayerTextDrawFadeEnd(playerid, Text:id, delay, bool:hide, ColorFade);
The same as OnTextDrawFadeEnd, but for Playertextdraws.
SS:
Install and see for yourself.
In the future:- - Animate step option.
- - Draw triangle and circle.
- - Animating position.
Thanks.
Author ReveresPL = Daewoo !
Re: a_td "Little include to TextDraw's" -
Rudy_ - 11.11.2014
Pretty nice work, Haven't tested or seen the code. But if it works, Great job.
Re: a_td "Little include to TextDraw's" -
Arastair - 11.11.2014
Seems good, gonna test it soon
Re: a_td "Little include to TextDraw's" -
Daewoo - 11.11.2014
Thanks, works in 100%.
I forgot to add callbacks, but soon I will add on a computer
Re: a_td "Little include to TextDraw's" -
Daewoo - 12.11.2014
BIGG Update !
Fix Bug
![Cheesy](images/smilies/biggrin.png)
Big Bug !