05.07.2009, 12:32
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:
- Then add these two functions to your script:
goes at OnPlayerConnect callback,
and:
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
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>
pawn Code:
flash_OnPlayerConnect(playerid);
and:
pawn Code:
flash_OnPlayerDisconnect(playerid, reason);
- 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