~DarkRacer~ Posted March 23, 2013 Posted March 23, 2013 I want to add some colors and i want to change the font of the death messages that appears on the left side of the screen, how would i do that?
~DarkRacer~ Posted March 23, 2013 Author Posted March 23, 2013 Post the script . i meant is there any file i can edit on or i just make new script?
EstrategiaGTA Posted March 23, 2013 Posted March 23, 2013 (edited) Post the script . i meant is there any file i can edit on or i just make new script? There is a file. Edited March 23, 2013 by Guest
~DarkRacer~ Posted March 23, 2013 Author Posted March 23, 2013 Post the script . i meant is there any file i can edit on or i just make new script? Maybe this: Your MTA folder/server/mods/deathmatch/resources/[gameplay]/deathmessages but this is only for Play mode not Race.. take a look: local root = getRootElement() addEventHandler("onPlayerWasted", root, function (ammo, killer, weapon, bodypart) local r, g, b = getColorFromString(string.upper(get("color"))) local message if killer then if killer ~= source then local killerType = getElementType(killer) if killerType == "player" then message = getPlayerName(killer).." killed "..getPlayerName(source).."." elseif killerType == "vehicle" then message = getPlayerName(getVehicleController(killer)).." killed "..getPlayerName(source).."." if get("show_vehiclename") then message = message .. " ("..getVehicleName(killer)..")" end end else message = getPlayerName(source).." committed suicide." end end if not message then message = getPlayerName(source).." died." end if weapon and get("show_weapon") then local weaponName = getWeaponNameFromID(weapon) if weaponName then message = message.." ("..weaponName..")" end end if bodypart and get("show_bodypart") then local bodypartName = getBodyPartName(bodypart) if bodypartName then message = message.." ("..getBodyPartName(bodypart)..")" end end outputChatBox(message, root, r, g, b) end )
~DarkRacer~ Posted March 23, 2013 Author Posted March 23, 2013 i saw the file but i can't see the part that display the dead players
Castillo Posted March 23, 2013 Posted March 23, 2013 Well, you are obviously blind, because the whole script is about that.
~DarkRacer~ Posted March 23, 2013 Author Posted March 23, 2013 local posLabel, posLabelShadow = createShadowedLabelFromSpare(posLeftDistance, y, 20, labelHeight, tostring(self.position) .. ')', 'right') -- and local playerLabel, playerLabelShadow = createShadowedLabelFromSpare(nameLeftDistance, y, 250, labelHeight, name .. time) this part add the dead player?
~DarkRacer~ Posted March 23, 2013 Author Posted March 23, 2013 That'll create the labels, yes. can i use hex color codes for coloring the label?
Castillo Posted March 23, 2013 Posted March 23, 2013 Labels don't support it by default, but you could search on the forums for the custom function. Though, you'll have to adapt it, since the custom function creates many labels to simulate HEX codes.
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