[Include] textanims.inc - Experimental textdraw animations editor
#1

Fader.inc
Last Updated: 16 July, 2018

A simple Global and Player textdraw color fader. You can fade any textdraw text color or box color or both.

Download
https://github.com/Agneese-Saini/SA-...lude/fader.inc

Wiki
PHP Code:
// To set how many textdraw can be faded at once, define this before inclusion!
#define MAX_TEXT_DRAW_FADES (16)
////////////////////////////////////
// GLOBAL TEXTDRAW FADER FUNCTIONS
////////////////////////////////////
/****************************************************
* Function:       TextDrawFadeForPlayer()
* Purpose:        Start fadinga global textdraw text color for player!
* Parameters:    "playerid" - player's id
*                 "text" - textdraw id
*                "from_color" - starting fade color
*                 "to_color" - ending fade color
*                 "update_rate" - rate at which the color fades during each timer's interval
*                 "timer_interval" - speed of timer
* Return:         1 - success
*                 0 - failure
****************************************************/
forward TextDrawFadeForPlayer(playeridText:textfrom_colorto_colorupdate_rate 2timer_interval 50);
/****************************************************
* Function:       TextDrawBoxFadeForPlayer()
* Purpose:        Start fadinga global textdraw box color for player!
* Parameters:    "playerid" - player's id
*                 "text" - textdraw id
*                "from_color" - starting fade color
*                 "to_color" - ending fade color
*                 "update_rate" - rate at which the color fades during each timer's interval
*                 "timer_interval" - speed of timer
* Return:         1 - success
*                 0 - failure
****************************************************/
forward TextDrawBoxFadeForPlayer(playeridText:textfrom_colorto_colorupdate_rate 2timer_interval 50);
/****************************************************
* Function:       TextDrawStopFadeForPlayer()
* Purpose:        Stop fading a global textdraw text color for player!
* Parameters:    "playerid" - player's id
*                 "text" - textdraw id
* Return:         1 - success
*                 0 - failure
****************************************************/
forward TextDrawStopFadeForPlayer(playeridText:text);
/****************************************************
* Function:       TextDrawStopBoxFadeForPlayer()
* Purpose:        Stop fading a global textdraw box color for player!
* Parameters:    "playerid" - player's id
*                 "text" - textdraw id
* Return:         1 - success
*                 0 - failure
****************************************************/
forward TextDrawStopBoxFadeForPlayer(playeridText:text);
#if defined OnTextDrawFaded
    /****************************************************
    * Method:       OnTextDrawFaded()
    * Purpose:        Called when the textdraw is fully faded to the final color
    * Parameters:    "playerid" - player's id
    *                 "text" - textdraw id
    *               "type" - 0 (TEXTDRAW_FADE_TEXT), 1(TEXTDRAW_FADE_BOX)
    * Return:         -
    ****************************************************/
    
forward OnTextDrawFaded(playeridText:texttype);
#endif
////////////////////////////////////
// PLAYER TEXTDRAW FADER FUNCTIONS
////////////////////////////////////
/****************************************************
* Function:       PlayerTextDrawFade()
* Purpose:        Start fadinga player textdraw text color for player!
* Parameters:    "playerid" - player's id
*                 "text" - player textdraw id
*                "from_color" - starting fade color
*                 "to_color" - ending fade color
*                 "update_rate" - rate at which the color fades during each timer's interval
*                 "timer_interval" - speed of timer
* Return:         1 - success
*                 0 - failure
****************************************************/
forward PlayerTextDrawFade(playeridPlayerText:textfrom_colorto_colorupdate_rate 2timer_interval 50);
/****************************************************
* Function:       PlayerTextDrawBoxFade()
* Purpose:        Start fadinga player textdraw box color for player!
* Parameters:    "playerid" - player's id
*                 "text" - player textdraw id
*                "from_color" - starting fade color
*                 "to_color" - ending fade color
*                 "update_rate" - rate at which the color fades during each timer's interval
*                 "timer_interval" - speed of timer
* Return:         1 - success
*                 0 - failure
****************************************************/
forward PlayerTextDrawBoxFade(playeridPlayerText:textfrom_colorto_colorupdate_rate 2timer_interval 50);
/****************************************************
* Function:       PlayerTextDrawStopFade()
* Purpose:        Stop fading a player textdraw text color!
* Parameters:    "playerid" - player's id
*                 "text" - textdraw id
* Return:         1 - success
*                 0 - failure
****************************************************/
forward PlayerTextDrawStopFade(playeridPlayerText:text);
/****************************************************
* Function:       PlayerTextDrawStopBoxFade()
* Purpose:        Stop fading a player textdraw box color!
* Parameters:    "playerid" - player's id
*                 "text" - textdraw id
* Return:         1 - success
*                 0 - failure
****************************************************/
forward PlayerTextDrawStopBoxFade(playeridPlayerText:text);
#if defined OnPlayerTextDrawFaded
    /****************************************************
    * Method:       OnPlayerTextDrawFaded()
    * Purpose:        Called when the player textdraw is fully faded to the final color
    * Parameters:    "playerid" - player's id
    *                 "text" - player textdraw id
    *               "type" - 0 (TEXTDRAW_FADE_TEXT), 1(TEXTDRAW_FADE_BOX)
    * Return:         -
    ****************************************************/
    
forward OnPlayerTextDrawFaded(playeridPlayerText:texttype);
#endif
//////////////////////////////////// 
Reply


Messages In This Thread
fader.inc - Global and Player textdarw fader - by Gammix - 14.11.2017, 09:40
Re: textanims.inc - Experimental textdraw animations editor - by Ritzy2K - 14.11.2017, 09:51
Re: textanims.inc - Experimental textdraw animations editor - by Zeth - 14.11.2017, 10:22
Re: textanims.inc - Experimental textdraw animations editor - by HydraHumza - 14.11.2017, 10:30
Re: textanims.inc - Experimental textdraw animations editor - by DonaldDuck - 14.11.2017, 10:47
Re: textanims.inc - Experimental textdraw animations editor - by Ponga - 14.11.2017, 10:49
Re: textanims.inc - Experimental textdraw animations editor - by Meller - 14.11.2017, 11:20
Re: textanims.inc - Experimental textdraw animations editor - by cuber - 14.11.2017, 11:40
Re: textanims.inc - Experimental textdraw animations editor - by Eoussama - 14.11.2017, 13:16
Re: textanims.inc - Experimental textdraw animations editor - by TheAdrenalin - 14.11.2017, 19:11
Re: textanims.inc - Experimental textdraw animations editor - by Chaprnks - 14.11.2017, 20:31
Re: textanims.inc - Experimental textdraw animations editor - by Andre02 - 15.11.2017, 04:45
Re: textanims.inc - Experimental textdraw animations editor - by Romz - 15.11.2017, 08:28
Re: textanims.inc - Experimental textdraw animations editor - by Pottus - 15.11.2017, 16:12
Re: textanims.inc - Experimental textdraw animations editor - by Gammix - 15.11.2017, 17:22
Re: textanims.inc - Experimental textdraw animations editor - by Pottus - 15.11.2017, 22:46
Re: textanims.inc - Experimental textdraw animations editor - by Gammix - 15.11.2017, 22:49
Re: textanims.inc - Experimental textdraw animations editor - by Pottus - 15.11.2017, 22:58
Re: textanims.inc - Experimental textdraw animations editor - by Y_Less - 16.11.2017, 18:06
Re: textanims.inc - Experimental textdraw animations editor - by Gammix - 16.11.2017, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)