BiColorNames v1.0 -
Igorek - 28.06.2011
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 p
ublic 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/
Re: BiColorNames v1.0 -
MicroD - 28.06.2011
MmMm nice idea!
Re: BiColorNames v1.0 -
Rock_Ro - 28.06.2011
Nice and unique, i should try this.
Thanks.
Re: BiColorNames v1.0 -
Dwayne_ - 28.06.2011
Good job
AW: BiColorNames v1.0 -
Forbidden - 28.06.2011
WTF!!Great JOB MAN
Re: BiColorNames v1.0 -
DartakousLien - 28.06.2011
Fantastic
Congratulations
Re: BiColorNames v1.0 -
[Ask]Terminator - 28.06.2011
very nice well done!
Re: BiColorNames v1.0 -
grand.Theft.Otto - 28.06.2011
That is some sick shit
Re: BiColorNames v1.0 -
GangsTa_ - 28.06.2011
The idea is well
Re: BiColorNames v1.0 -
The Taker - 29.06.2011
can someone translate the fs to english please i really need this for my server thanks
Re: BiColorNames v1.0 -
Retardedwolf - 29.06.2011
Screenshot amazed me, for a
mirror.
Re: BiColorNames v1.0 -
Igorek - 29.06.2011
Quote:
Originally Posted by David Skrbic
MmMm nice idea!
|
Quote:
Originally Posted by Rock_Ro
Nice and unique, i should try this.
Thanks.
|
Quote:
Originally Posted by Dwayne_
Good job
|
Quote:
Originally Posted by Forbidden
WTF!!Great JOB MAN
|
Quote:
Originally Posted by DJloko
Fantastic
Congratulations
|
Quote:
Originally Posted by [Ask]Terminator
very nice well done!
|
Quote:
Originally Posted by GangsTa_
The idea is well
|
Thanks...
Quote:
Originally Posted by The Taker
can someone translate the fs to english please i really need this for my server thanks
|
Ok, download:
http://solidfiles.com/d/d66a/
Re: BiColorNames v1.0 -
Igorek - 17.07.2011
more comments please
Re: BiColorNames v1.0 -
Lorenc_ - 17.07.2011
Ohh thats cool, I made something like this on my server though supports health only.
Re: BiColorNames v1.0 -
Flyfishes - 17.07.2011
This is really good, nice job!
Re: BiColorNames v1.0 -
Igorek - 17.07.2011
Thanks all
Re: BiColorNames v1.0 -
gamer931215 - 17.07.2011
Looks awesome, but im wondering
why are you using 256char strings if a nickname can only be 24 (or 32, cant remember the exact limit :P) characters max ?
Your wasting a lot of memory there...
Re: BiColorNames v1.0 -
Igorek - 17.07.2011
HP bar and Armour bar,color, too, takes up space.
I would also like to use, for example
* VIP * [Teg] Name - 3 colors
Re: BiColorNames v1.0 -
gamer931215 - 17.07.2011
Quote:
Originally Posted by Igorek
HP bar and Armour bar,color, too, takes up space.
I would also like to use, for example
* VIP * [Teg] Name - 3 colors
|
Example:
{COLORR}* VIP * {COLORR}[Teg] {COLORR}Name \r\n •••••••••{ffffff}• \r\n •••••••••{ffffff}•
takes 90 characters, so i think 128 (maybe for longer names 140-150 chars) is more than enough and saves some ram usage
But still, nice script/good idea!
Re: BiColorNames v1.0 -
davve95 - 17.07.2011
Cool! Good job