Arsilex Posted January 20, 2012 Share Posted January 20, 2012 Miren Queria cambiar el color de un texto que sale al poner redo en race mode me quedo asi addCommandHandler('redo', function( player, command, value ) if isPlayerInACLGroup(player, g_GameOptions.admingroup) then local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap then outputChatBox('#FF8400Map restarted by#FFFFFF ' .. getPlayerName(player), g_Root, 3, 180, 255, true) if not exports.mapmanager:changeGamemodeMap (currentMap, nil, true) then problemChangingMap() end else outputRace("You can't restart the map because no map is running", player) end else outputRace("You are not an Admin", player) end end ) Lo que yo quero es que en esta linea outputChatBox('#FF8400Map restarted by#FFFFFF ' .. getPlayerName(player), g_Root, 3, 180, 255, true) Cuando ponga yo redo salta el getPlayerName con el color de el Player Alguen me podria ayudar porfavor Link to comment
Castillo Posted January 20, 2012 Share Posted January 20, 2012 addCommandHandler('redo', function( player, command, value ) if isPlayerInACLGroup(player, g_GameOptions.admingroup) then local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap then local r, g, b = getPlayerNametagColor(player) local hex = RGBToHex(r, g, b) outputChatBox('Map restarted by'.. hex ..' ' .. _getPlayerName(player), root, 255, 50, 0, true) if not exports.mapmanager:changeGamemodeMap (currentMap, nil, true) then problemChangingMap() end else outputRace("You can't restart the map because no map is running", player) end else outputRace("You are not an Admin", player) end end ) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end Link to comment
Arsilex Posted January 21, 2012 Author Share Posted January 21, 2012 Castillo como yo SIempre DIgo Eres el Amo de MTA Mil Grasias, Grasias, Grasias, Grasias, Grasias, Grasias, .... Link to comment
Castillo Posted January 21, 2012 Share Posted January 21, 2012 No hay de que . P.D: Es "Gracias", no "Grasias", con "C". Link to comment
Arsilex Posted January 21, 2012 Author Share Posted January 21, 2012 ._. Parecen mi Maestro de Lengua ._. Siempre diciéndome que es gracias no grasias Link to comment
12p Posted January 21, 2012 Share Posted January 21, 2012 Cuando hagas tu currículum, entenderás la importancia del lenguaje. Link to comment
Recommended Posts