[Include] BiColorNames v1.0
#1



Hello.
Give her your attention include, which allows the use of nick over the player at least 2 colors.Include replaces the standard hp / armor bars, which if necessary can off.Include detects the tag in the nick, if it is - then the tag will be the same color, and the name - in the nick other color.

All the features include:
Код:
-------------------------------------------------- ------------------------------ 
UpdateIndicator (playerid); - 3DText updates over the player 
Parameters: 
playerid - Player ID 
-------------------------------------------------- ------------------------------ 
DivideName (playerid); - updates the player's name 
Parameters: 
playerid - Player ID 
-------------------------------------------------- ------------------------------ 
SetPlayerBiColor (playerid, COLOR1, COLOR2, bool: Marker); - change color nick Player 
Parameters: 
playerid - Player ID 
COLOR1 - color tag 
COLOR2 - username color 
bool: Marker - change the color of the player on the radar? true - yes; false - no. (A marker of the player takes the color of nickname) 
-------------------------------------------------- ------------------------------ 
SetPlayerColorName (playerid, name []); - change the name of the player (replacing SetPlayerName) 
Parameters: 
playerid - Player ID 
name [] - the new name 
-------------------------------------------------- ------------------------------ 
DeathPlayer (playerid); - update the sign above the player's death 
Parameters: 
playerid - Player ID 
-------------------------------------------------- ------------------------------ 
ShowBiColorName (playerid, bool: enable); - show / hide the inscription over the player 
Parameters: 
playerid - Player ID 
bool: enable - show the inscription over the player? true - yes; false - there is no 
-------------------------------------------------- ------------------------------ 
ShowBiColorNameAll (bool: enable); - show / hide the inscription over the players 
Parameters: 
bool: enable - show the inscription over the players? true - yes; false - there is no 
-------------------------------------------------- ------------------------------ 
ShowBarsPlayer (playerid, bool: enable); - hide / show hp-bar and armour-bar over the player 
Parameters: 
playerid - Player ID 
bool: enable: true - display; false - ckryvat 
-------------------------------------------------- ------------------------------ 
ShowBarsPlayerAll (bool: enable); - hide / show hp-bar and armour-bar over the players 
Parameters: 
bool: enable: true - display; false - ckryvat 
-------------------------------------------------- ------------------------------ 
LoadBiColorNames (); - download BiColorNames 
Parameters: 
No parameters 
-------------------------------------------------- ------------------------------ 
Encoding (color); - translation feature color touch-up required for the posts Colour Embedding, by OKStyle 
Parameters: 
color - the color (hex)
Only some of the functions we need to work, the rest are called automatically.
Now let's begin ...

Installation / configuration of the system:

1. Copy the BiColorNames.inc folder in pawno / includes
2. Connect to include. Find the top fashion # include <a_samp> and add below:
Код:
 # include <BiColorNames>
3. add to the public OnGameModeInit () :
Код:
 LoadBiColorNames ();// Disable nicknames standard
Note: In your fashion in public OnGameModeInit () should be ShowNameTags (1);

4. In the public OnPlayerConnect (playerid) add:
Код:
ShowBiColorName (playerid, true); / / create an inscription over the player
5.B public OnPlayerDisconnect (playerid) add:
Код:
ShowBiColorName (playerid, false); / / delete 3Dtext over the player
6. In the public OnPlayerUpdate (playerid) add:
Код:
 UpdateIndicator (playerid); / / update the label
7. In the public OnPlayerDeath (playerid, killerid, reason) add:
Код:
DeathPlayer (playerid); / / update the label after his death
----------------------------------
Well, the main part, we implemented a mod.
Next I'll teach you to change colors, as well as how to properly update the nickname, etc.

Setting the colors in the spawn:

To set the colors in the spawn to use the SetPlayerBiColor (playerid, COLOR1, COLOR2, bool: Marker);

Options:
playerid - Player ID
COLOR1 - the color of the tag (color 1)
COLOR2 - username color (color 2)
bool: Marker - change the color of the player on the radar? true - yes; false - no. (A marker of the player takes the color of nickname)

In include I introduced 32 colors that you can use to test.
I even made the table:



For example if you want to put spawn in the following colors: BLUE_N - the color of the tag; RED_N - username color. If the nickname is not a tag, the name will be all one color.

To be placed in the following colors spawn in public OnPlayerSpawn (playerid) add:
Код:
 SetPlayerBiColor (playerid, BLUE_N, RED_N, true); / / expose the color of the player. true - and thus will change color on the radar.
This feature can be used in other public servers, for example, even when typing a command.

Change nick:

As our nickname is the 3dText, then after changing his nickname to be updated.
To change the nickname need Instead of the standard function SetPlayerName (playerid, name []); use the SetPlayerColorName (playerid, name []);

Options:
playerid - Player ID
name [] - the new name

For example:
Код:
 SetPlayerColorName (playerid, "Games ");
Create / delete 3DText over the player:

You can hide a nickname, HP and armor bar over the player.
During that meet the following functions:

Код:
ShowBiColorName (playerid, bool: enable); / / show / hide the inscription over the player
Options:
playerid - Player ID
bool: enable - show the inscription over the player? true - yes; false - there is no

Код:
ShowBiColorNameAll (bool: enable); / / show / hide the labels on all players
Options:
bool: enable - show the inscription over the players? true - yes; false - there is no

Show / Hide hp and armor bar:

You can disable the HP and armor bar, then over the player will be only his nickname.

During that meet the following functions:
Код:
ShowBarsPlayer (playerid, bool: enable); / / hide / show hp-bar and armour-bar over the player
Options:
playerid - Player ID
bool: enable - true - show; false - hide

Код:
 ShowBarsPlayerAll (bool: enable); / / hide / show hp-bar and armour-bar over the players
Options:
bool: enable true - show; false - hide

Basic script (use functions include)

I did exact same fs, where you can see the application functions, as well as hassle-free check include work.

fs Commands:
/ red - set the color of the tag - Green, Nick - red. (The color of the marker does not change)
/ purple - set the color of the tag - yellow, color nick - purple. (Marker color varies)
/ showbars [0 / 1] - show / hide your HP and armor bar. 1 - show, 0 - to hide.
/ showbarsall [0 / 1] - show / hide hp and armor bars all players. 1 - show, 0 - to hide.
/ showlabel [0 / 1] - create / delete the label. 1 - a, 0 - to remove.
/ showlabelall [0 / 1] - create / delete labels of all the players. 1 - a, 0 - to remove.
/ bicolorname [new nickname] - change the name

Download:

fs + include+ image with the colors: http://solidfiles.com/d/d66a/
Reply


Messages In This Thread
BiColorNames v1.0 - by Igorek - 28.06.2011, 12:38
Re: BiColorNames v1.0 - by MicroD - 28.06.2011, 13:07
Re: BiColorNames v1.0 - by Rock_Ro - 28.06.2011, 13:16
Re: BiColorNames v1.0 - by Dwayne_ - 28.06.2011, 13:20
AW: BiColorNames v1.0 - by Forbidden - 28.06.2011, 13:45
Re: BiColorNames v1.0 - by DartakousLien - 28.06.2011, 13:57
Re: BiColorNames v1.0 - by [Ask]Terminator - 28.06.2011, 22:09
Re: BiColorNames v1.0 - by grand.Theft.Otto - 28.06.2011, 22:21
Re: BiColorNames v1.0 - by GangsTa_ - 28.06.2011, 22:22
Re: BiColorNames v1.0 - by The Taker - 29.06.2011, 00:26
Re: BiColorNames v1.0 - by Retardedwolf - 29.06.2011, 00:42
Re: BiColorNames v1.0 - by Igorek - 29.06.2011, 01:44
Re: BiColorNames v1.0 - by Igorek - 17.07.2011, 06:21
Re: BiColorNames v1.0 - by Lorenc_ - 17.07.2011, 06:27
Re: BiColorNames v1.0 - by Flyfishes - 17.07.2011, 06:37
Re: BiColorNames v1.0 - by Igorek - 17.07.2011, 13:34
Re: BiColorNames v1.0 - by gamer931215 - 17.07.2011, 13:57
Re: BiColorNames v1.0 - by Igorek - 17.07.2011, 14:19
Re: BiColorNames v1.0 - by gamer931215 - 17.07.2011, 14:28
Re: BiColorNames v1.0 - by davve95 - 17.07.2011, 14:59
Re: BiColorNames v1.0 - by Nexotronix - 17.07.2011, 21:46
Re: BiColorNames v1.0 - by Igorek - 18.07.2011, 02:25
Re: BiColorNames v1.0 - by Deskoft - 18.07.2011, 03:02
Re: BiColorNames v1.0 - by Igorek - 18.07.2011, 11:58
Re: BiColorNames v1.0 - by Toreno - 18.07.2011, 14:48
Respuesta: BiColorNames v1.0 - by Ari3l - 18.07.2011, 15:09
Re: BiColorNames v1.0 - by Igorek - 19.07.2011, 04:24
Re: BiColorNames v1.0 - by SpiderWalk - 19.07.2011, 10:09
Re: BiColorNames v1.0 - by AirKite - 19.07.2011, 13:44
Re: BiColorNames v1.0 - by SpiderWalk - 19.07.2011, 13:45
Re: BiColorNames v1.0 - by Sasino97 - 19.07.2011, 16:38
Re: BiColorNames v1.0 - by Igorek - 20.07.2011, 05:38
Re: BiColorNames v1.0 - by Igorek - 22.07.2011, 09:20

Forum Jump:


Users browsing this thread: 1 Guest(s)