28.06.2011, 12:38
(
Последний раз редактировалось Igorek; 29.06.2011 в 01:48.
)
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)
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>
Код:
LoadBiColorNames ();// Disable nicknames standard
4. In the public OnPlayerConnect (playerid) add:
Код:
ShowBiColorName (playerid, true); / / create an inscription over the player
Код:
ShowBiColorName (playerid, false); / / delete 3Dtext over the player
Код:
UpdateIndicator (playerid); / / update the label
Код:
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.
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 ");
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
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
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
playerid - Player ID
bool: enable - true - show; false - hide
Код:
ShowBarsPlayerAll (bool: enable); / / hide / show hp-bar and armour-bar over the players
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/