~DarkRacer~ Posted March 23, 2013 Share 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? Link to comment
iPrestege Posted March 23, 2013 Share Posted March 23, 2013 guiLabelSetHorizontalAlign Link to comment
~DarkRacer~ Posted March 23, 2013 Author Share Posted March 23, 2013 and what file to edit ? Link to comment
~DarkRacer~ Posted March 23, 2013 Author Share Posted March 23, 2013 Post the script . i meant is there any file i can edit on or i just make new script? Link to comment
EstrategiaGTA Posted March 23, 2013 Share 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 Link to comment
iPrestege Posted March 23, 2013 Share Posted March 23, 2013 I See it but it's not a label Link to comment
Castillo Posted March 23, 2013 Share Posted March 23, 2013 "race/rankingboard_client.lua". Link to comment
~DarkRacer~ Posted March 23, 2013 Author Share 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 ) Link to comment
iPrestege Posted March 23, 2013 Share Posted March 23, 2013 "race/rankingboard_client.lua". ^ Check this Link to comment
~DarkRacer~ Posted March 23, 2013 Author Share Posted March 23, 2013 i saw the file but i can't see the part that display the dead players Link to comment
Castillo Posted March 23, 2013 Share Posted March 23, 2013 Well, you are obviously blind, because the whole script is about that. Link to comment
~DarkRacer~ Posted March 23, 2013 Author Share 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? Link to comment
Castillo Posted March 23, 2013 Share Posted March 23, 2013 That'll create the labels, yes. Link to comment
~DarkRacer~ Posted March 23, 2013 Author Share Posted March 23, 2013 That'll create the labels, yes. can i use hex color codes for coloring the label? Link to comment
Castillo Posted March 23, 2013 Share 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. 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