Hey everyone, I decided to edit this and ask all of my questions here that I currently have:
1. How do I add/change the name/text color in-game?
2. Is it possible to edit the server so I can chat with players and see their chat from the Command Prompt(Server Console)?
ALL FOR RMX-OS!
Thanks <3
1. Find this line in RMX-OS, edit the 15 to the size of your liking(it will be a different number because I edited mine to 15, I think it was 24 default), this is for how big the username text is. Around line 3409
@name_sprite.bitmap.font.size = 15
# calculate width of name
w = @name_sprite.bitmap.text_size(username).width + 4
# set offsets
@name_sprite.ox = w / 2
@name_sprite.oy = self.bitmap.height / 4 + 23
@name_sprite.bitmap = Bitmap.new(w, 23)
@name_sprite.bitmap.font.size = 15
# if this player
if usergroup == nil
# self color
@name_sprite.bitmap.font.color = RMXOS::Data::COLORS['self']
# if group color exists
elsif RMXOS::Data::COLORS.has_key?(usergroup)
# get group color
@name_sprite.bitmap.font.color = RMXOS::Data::COLORS[usergroup]
end
# draw name
@name_sprite.bitmap.draw_text_full(1, 1, w, 15, username, 1)
end
# if sprite exists
if @name_sprite != nil
# make sure name sprite is at the proper position
@name_sprite.x, @name_sprite.y, @name_sprite.z = self.x, self.y, self.z
end
end
The username color depends on which user group the user is in, but if you want to change the colors of the user groups, find this portion of the script around line 195
COLORS = {}
COLORS['self'] = Color.new(0, 255, 0)
COLORS[GROUP_ADMIN] = Color.new(64, 192, 255)
COLORS[GROUP_2NDADMIN] = Color.new(128, 192, 255)
COLORS[GROUP_MOD] = Color.new(255, 255, 0)
COLORS[GROUP_PLAYER] = Color.new(255, 255, 255)
end
2. Hm, not sure if I can answer that question. But good luck on getting it answered. It would likely require an extension I'd think.