Nametag COLOR - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Nametag COLOR (
/showthread.php?tid=511147)
Nametag COLOR -
Trynda - 04.05.2014
can someone say to me whats the way to do this..
/bandana
When i set your gang color to "green" and your in your gang and if you type /bandana your name tag color should be set green.
It should be save on .cfg
every family should be have gang color otherwise /bandana wont work.
NOTE: Im not asking for codes, so feel free to say here whats the way,
Thanks
Re: Nametag COLOR -
PrivatioBoni - 04.05.2014
I don't know what saving system to use so can't give you exact code anyway.
When you give a player a colour, it would save into a variable, e.g.
PlayerInfo[playerid][pColor] = 1;
pColour = 1 could be red, pColour = 2 could be green etc. Save the colour on disconnect (with Y_INI or whatever you're using.) When the userfiles load the colour value would load, then depending on what colour value it is, you use this function:
https://sampwiki.blast.hk/wiki/Function:SetPlayerColor.
This is a jumbled post but I hope you understand.
Re: Nametag COLOR -
Galletziz - 04.05.2014
You can use SetPlayerColor(playerid, color[]);
Go to read about this function, that get the color of the team, when you declare it on callback OnPlayerRequestClass..
Bye
Re: Nametag COLOR -
Trynda - 04.05.2014
Quote:
Originally Posted by PrivatioBoni
I don't know what saving system to use so can't give you exact code anyway.
When you give a player a colour, it would save into a variable, e.g.
PlayerInfo[playerid][pColor] = 1;
pColour = 1 could be red, pColour = 2 could be green etc. Save the colour on disconnect (with Y_INI or whatever you're using.) When the userfiles load the colour value would load, then depending on what colour value it is, you use this function: https://sampwiki.blast.hk/wiki/Function:SetPlayerColor.
This is a jumbled post but I hope you understand.
|
Nice suggestion BTW,
Is it possible to set the color through hex color codes?
EDIT: Lol i dont know what saving system i use, but here is the includes
Код:
#include <a_samp>
#include <a_zones>
#include <streamer>
#include <foreach>
#include <progress>
#include <ZCMD>
#include <YSI/y_timers.inc>
#include <yom_buttons>
#include <sscanf2>