[Include] [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!)
#1

Hello,

I've decided to release this include so others can use it, too.


What is it?
- It's an include which will change player's first color to second and in reverse in the amount of time you set.


How do i use it?
- Download flashcolor.inc and put it into your \pawno\include\ folder.
- Open your .pwn file and add this into your script:
pawn Code:
#include <flashcolor>
- Then add these two functions to your script:
pawn Code:
flash_OnPlayerConnect(playerid);
goes at OnPlayerConnect callback,
and:
pawn Code:
flash_OnPlayerDisconnect(playerid, reason);
goes at OnPlayerDisconnect callback.
- Add SetPlayerFlashColor/SetPlayerFlashColorForAll to your script.
- Compile your script.


Functions:

SetPlayerFlashColor(playerid, time_delay, repeat, color1, color2);
* Explanation: this function will flash player's color from color1 to color2.
* @playerid - id of the player you want set flash color.
* @time_delay - timer interval, you can set speed of changing (make sure you'll set timer_delay at least 1000
miliseconds (1 second)).
* @repeat - if you're using SetPlayerFlashColor in timer then put 0 (don't repeat), but if you're using
it at OnPlayerSpawn or any other callback like that, then set repeat to 1 (repeat).

* @color1 - color1 in hexadecimal code.
* @color2 - color2 in hexadecimal code.

SetPlayerFlashColorForAll(time_delay, repeat, color1, color2);
* Explanation: this function will flash all player's color from color1 to color2.
* @time_delay - timer interval, you can set speed of changing (make sure you'll set timer_delay at least 1000
miliseconds (1 second)).
* @repeat - if you're using SetPlayerFlashColor in timer then put 0 (don't repeat), but if you're using
it at OnPlayerSpawn or any other callback like that, then set repeat to 1 (repeat).

* @color1 - color1 in hexadecimal code.
* @color2 - color2 in hexadecimal code.

KillFlashColor(playerid);
* Explanation: this function will disable color-flashing on player.
* @playerid - id of the player you want disable color-flashing.
* Other: - this function is also used at flash_OnPlayerDisconnect callback, let it stay there, just
use it when you want to stop player's color-flashing.

Credits:
* Me (Don Correlli)


Download:
* flashcolor.inc v1.1
Reply


Messages In This Thread
[INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 05.07.2009, 12:32
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by refshal - 05.07.2009, 12:38
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by [MOB]TheAgent - 05.07.2009, 12:40
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by [DrM]spatrik - 05.07.2009, 12:46
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 05.07.2009, 12:54
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by [DrM]spatrik - 05.07.2009, 13:00
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Serediucr - 05.07.2009, 20:29
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by *ToM* - 05.07.2009, 22:34
Re: [INC] flashcolor.inc (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 06.07.2009, 00:37
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Danny_Costelo - 06.07.2009, 02:15
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by illay - 06.07.2009, 06:04
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 06.07.2009, 13:47
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by luxeon - 06.07.2009, 15:34
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by misko28 - 06.07.2009, 20:04
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Jokerstyle - 16.07.2009, 20:02
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Jokerstyle - 17.07.2009, 18:23
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 17.07.2009, 18:51
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 17.07.2009, 19:36
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by [HKS]dlegend - 03.10.2009, 03:03
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by cubaton3 - 03.10.2009, 03:26
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Jofi - 03.10.2009, 07:55
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 03.10.2009, 08:50
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Jofi - 03.10.2009, 09:51
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 03.10.2009, 09:53
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by [HKS]dlegend - 03.10.2009, 13:27
Re: [INC] flashcolor.inc v1.1 (SetPlayerFlashColor & SetPlayerFlashColorForAll!) - by Correlli - 03.10.2009, 13:28

Forum Jump:


Users browsing this thread: 12 Guest(s)