Cannonball Posted March 6, 2008 Share Posted March 6, 2008 Is it possible to bind players into a custom group (clans, crews, admins, moderators, banned and so on) which has an own color. For example all normal clients have a white/default name color and the groups have own. But the command looks so long, should be shorter. In this example an admin is logged in and he is in the admin group (admin group color color: green). The color for the clan [ABC] is blue. Player0815: Hey Admin123, I joined the [ABC] clan. Could you set me to the group now? Admin123: /setgroup Player0815 [ABC] Console: Player0815 has been setted to the [ABC] group by Admin123. Player0815: Nice, thank you! The command would be /setgroup If the thing with the groups isn't possible it would be better if all clients can change their namecolor. Example: Player0815: /namecolor 3 Player0815: My name is red now ! The command would be /namecolor Link to comment
Brophy Posted March 6, 2008 Share Posted March 6, 2008 Yep, its possible, you just need to find someone to code it, or learn how do it yourself Link to comment
Woovie Posted March 6, 2008 Share Posted March 6, 2008 Wow you copied this from another topic. Yes it is possible and rather easy. Just do it yourself. Link to comment
Cannonball Posted March 7, 2008 Author Share Posted March 7, 2008 I know I copied, this was the easied explained. And I tried from the wiki, but I cant seem to get it working. So pleas get me a script for it... This is the one from wiki: function nametagColorChange ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "nametagcolor", nametagColorChange ) But does this one save's the color you changed it in too? And what is the command to change it? Link to comment
Woovie Posted March 7, 2008 Share Posted March 7, 2008 Here I will be nice and write it for you. Here is name color. I have explained everything for you in it. function nickColChange ( player, commandName, r, g, b ) -- This will make a function called "nickColChange". It will be done on the player when he types the commandName and 3 color values ranging from 0-255. setPlayerNametagColor ( player, r, g, b ) -- This physically sets the data to the players' name. outputChatBox ("#00FF00Your name has been set with these color values: "..r..", "..g..", "..b..""), player, 255, 255, 255, true ) -- This outputs to the chatbox what colors you set. end addCommandHandler ( "nickcol", nickColChange ) -- This says set the commnad of /nickcol to do function nickColChnage. nickcol = commandName. Example: /nickcol 255 255 0 Would result in[NR]LeetWoovie And the chatbox will output Your name has been set with these color values: 255, 255, 0. Here is the clan command. This one is fairly simple. I also made it so you can create a team corresponding to the tags. function clanNameCol ( player, commandName, r, g, b, clantag, teamset ) local clant = getClientName ( player ) if teamset == 1 then setPlayerNametagColor ( player, r, g, b ) setPlayerNametagText ( player, ""..clantag.." "..clant.."" ) local newteam = createTeam ( clantag, r, g, b ) setPlayerTeam ( player, newteam ) outputChatBox ("#00FF00Your name has been set with these color values: "..r..", "..g..", "..b.." and with the tag "..clantag.." on the "..clantag.." team."), player, 255, 255, 255, true ) else setPlayerNametagColor ( player, r, g, b ) setPlayerNametagText ( player, ""..clantag.." "..clant.."" ) outputChatBox ("#00FF00Your name has been set with these color values: "..r..", "..g..", "..b.." and with the tag "..clantag.."."), player, 255, 255, 255, true ) end end addCommandHandler ( "setgroup", clanNameCol ) Example 1: Player name is bob. /setgroup 255 255 0 [NR] 1 will result in [NR]bob on team [NR] And the chatbox will output Your name has been set with these color values: 255, 255, 0 and with the tag [NR] on the [NR] team. Example 2: /setgroup 255 255 0 [NR] 0 will result in [NR]bob without a team and the chatbox will output Your name has been set with these color values: 255, 255, 0 and with the tag [NR]. I have not tested it. Most likely an error somewhere... Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now