Jump to content

Julian09123

Members
  • Posts

    411
  • Joined

  • Last visited

Everything posted by Julian09123

  1. Hice eso pero el Home y enemy me salen dos veces y el spectators una vez function joinHomeTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() local PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinHomeTeam", getRootElement(), localPlayer) triggerServerEvent("outputall2", root, PlayerName.. " #00ff00Has Joined to " ..homeName) end function joinEnemyTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() local PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinEnemyTeam", getRootElement(), localPlayer) triggerServerEvent("outputall3", root, PlayerName.. " #00ff00Has Joined to " ..enemyName) end function joinSpectatorsTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() local PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinSpectatorsTeam", getRootElement(), localPlayer) triggerServerEvent("outputall", root, PlayerName.. " #00ff00Has Joined to Spectators") end addEvent("outputall", true) addEventHandler("outputall", root, function (msg) outputChatBox(msg, root, 255, 255, 255, true) end ) addEvent("outputall2", true) addEventHandler("outputall2", root, function (msg2) outputChatBox(msg2, root, 255, 255, 255, true) end ) addEvent("outputall3", true) addEventHandler("outputall2", root, function (msg3) outputChatBox(msg3, root, 255, 255, 255, true) end ) Listo, me habia equivocado en una linea! Graciasss Tomas!
  2. Julian09123

    Problema

    Hola quisiera saber como hacer para que a todos les salga el mensaje de Has joined blabla function joinHomeTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() local PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinHomeTeam", getRootElement(), localPlayer) outputChatBox ( PlayerName.. " #00ff00Has Joined to " .. homeName .. "" ,255, 255, 255, true ) end function joinEnemyTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() local PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinEnemyTeam", getRootElement(), localPlayer) outputChatBox ( PlayerName.. " #00ff00Has Joined to " .. enemyName .. "" ,255, 255, 255, true ) end function joinSpectatorsTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() local PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinSpectatorsTeam", getRootElement(), localPlayer) outputChatBox ( PlayerName.. " #00ff00Has Joined to Spectators" ,255, 255, 255, true ) end Como hago para que les salga a todos? por que me sale a mi solo y a los otros a ellos nomas
  3. Listo, Ya lo arregle Muchas Gracias
  4. Lo que pasa es que el codigo que tiene el jugador influye con el texto, por ej Tengo el texto de color blanco y el codigo del jugador es negro, ese codigo transforma al texto de color blanco a negro. A lo que me refiero es que si: Juli#00ff00an Has Joined blabla El has joined blabla saldra del color del codigo del jugador y no quiero eso, en cambio Juli saldra en el color que le puse con rgb del outputchatbox
  5. Bien, funciono pero hay otro problema por ej Yo tengo Juli#004400an Ese codigo al ultimo influye en el texto y lo pone a ese color Como podria yo evitar que el colorcode interfiera con el texto del outputchatbox?
  6. Funciono pero me muestra los codes de color, como podria hacer para que me aparezca el color del usuario?
  7. Hola, estoy intentando hacer que salga en el outputchatbox un texto pero con el nombre de extra. Tengo esto function joinHomeTeam() guiSetVisible(Window, false) showCursor(false) -- Window closed localPlayer = getLocalPlayer() PlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("joinHomeTeam", getRootElement(), localPlayer) outputChatBox ( PlayerName " Has Joined to", 255, 0, 0, false ) end pero me da un error con el PlayerName me dice Attempt to call global "Playername" (a string value) Alguien me podria explicar que quiere decir eso? y como se soluciona? Gracias
  8. Julian09123

    Show

    Gracias estare viendo
  9. Julian09123

    Show

    Gracias, pero tengo un problema, como hago para ocultar un script? osea tengo un speedometer pero sigue saliendo Gracias
  10. Julian09123

    Show

    Hola amigos, como era la funcion para ocultar todo de la pantalla?
  11. jajaajajjajajajajaj fault mia, Gracias amigo!
  12. Hola amigos, quiero hacer un script que al entrar al servidor si alguno tiene un txd o dff de hunter se cambie al normal pero no funciona... Hace el efecto como q cambia de skin de inf pero no lo cambia al hunter tengo esto function replaceModel() txd = engineLoadTXD("hunter.txd", 425 ) engineImportTXD(dff, 425) dff = engineLoadDFF("hunter.dff", 425 ) engineReplaceModel(dff, 425) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel )
  13. Si creo que encontre un resource en la comunidad, lo probare PD: Probe un script pero lo q hace es sacar la musica de ese map, no anularla de todos los mapas, habra algun resource ya? o como lo hago?
  14. Julian09123

    Musica

    Hola, me gustaria saber como hacer para mutear la musica de un map, y que se escuche por ej la de una radio online Como se podria hacer? por que la M solo sirve en cada map y es feo estar muteando la musica cada mapa Gracias
  15. Tengo esto CODIGO ELIMINADO POR Solidsnake14
  16. Julian09123

    Hide car

    Hola, tengo un problema, va es un warning pero me gustaria arreglarlo, me dice BadArgument @ setElementInterior y [DUPX40] o aveces mas DUP si hay mas players Que significa DUP? Como lo podria fixear? estas son las lineas q marca CODIGO ELIMINADO POR Solidsnake14 Gracias
  17. Julian09123

    team

    Tengo estas lineas if (showTeams or (serverInfo.forceshowteams and not serverInfo.forcehideteams)) and not serverInfo.forcehideteams then -- And then the teams local teamSortTableIndex = 1 local teamSortTable = {} sortTableIndex = 1 sortTable = {} local teams = getElementsByType( "team" ) for key, team in ipairs( teams ) do -- Add teams to sorting table first teamSortTable[teamSortTableIndex] = {} for key, column in ipairs( scoreboardColumns ) do local content if column.name == "name" then local teamName = getTeamName( team ) local teamMemberCount = #getPlayersInTeam( team ) teamName = iif( teamName, tostring( teamName ), "-" ) teamMemberCount = iif( teamMemberCount, tostring( teamMemberCount ), "0" ) teamName = teamName .. " (" .. teamMemberCount .. " player" .. iif( teamMemberCount == "1", "", "s" ) .. ")" if serverInfo.allowcolorcodes then if string.find( teamName, "#%x%x%x%x%x%x" ) then local colorCodes = {} while( string.find( teamName, "#%x%x%x%x%x%x" ) ) do local startPos, endPos = string.find( teamName, "#%x%x%x%x%x%x" ) if startPos then colorCode = string.sub( teamName, startPos, endPos ) table.insert( colorCodes, { { getColorFromString( colorCode ) }, startPos } ) teamName = string.gsub( teamName, "#%x%x%x%x%x%x", "", 1 ) end end content = { teamName, colorCodes } else content = teamName end else content = teamName end else content = getElementData( team, column.name ) end content = iif( content and column.name ~= "name" and type( content ) ~= "table", tostring( content ), content ) if column.textFunction then if content and column.name == "name" and type( content ) == "table" then content[1] = column.textFunction( content[1], team ) else content = column.textFunction( content, team ) end end teamSortTable[teamSortTableIndex][column.name] = content teamSortTable[teamSortTableIndex]["__SCOREBOARDELEMENT__"] = team end teamSortTableIndex = teamSortTableIndex + 1 -- and then the players sortTableIndex = 1 sortTable[team] = {} local players = getPlayersInTeam( team ) for key, player in ipairs( players ) do sortTable[team][sortTableIndex] = {} for key, column in ipairs( scoreboardColumns ) do local content if column.name == "name" then local playerName = getPlayerName( player ) if serverInfo.allowcolorcodes then if string.find( playerName, "#%x%x%x%x%x%x" ) then local colorCodes = {} while( string.find( playerName, "#%x%x%x%x%x%x" ) ) do local startPos, endPos = string.find( playerName, "#%x%x%x%x%x%x" ) if startPos then colorCode = string.sub( playerName, startPos, endPos ) table.insert( colorCodes, { { getColorFromString( colorCode ) }, startPos } ) playerName = string.gsub( playerName, "#%x%x%x%x%x%x", "", 1 ) end end content = { playerName, colorCodes } else content = playerName end else content = playerName end elseif column.name == "ping" then content = getPlayerPing( player ) else content = getElementData( player, column.name ) end
  18. Julian09123

    team

    Le di restart y abre el rectangulo del scoreboard y no sale nada solo lo negro osea, le doy /logout y sale todo negro
  19. Julian09123

    team

    Sigue apareciendo -- Add teams to sorting table first teamSortTable[teamSortTableIndex] = {} for key, column in ipairs( scoreboardColumns ) do local content if column.name == "name" then local teamName = getTeamName( team ) local teamMemberCount = #getPlayersInTeam( team ) teamName = iif( teamName, tostring( teamName ), "-" ) teamMemberCount = iif( teamMemberCount, tostring( teamMemberCount ), "0" ) if (teamMemberCount == 0) then return end teamName = teamName .. " (" .. teamMemberCount .. " player" .. iif( teamMemberCount == "1", "", "s" ) .. ")" if serverInfo.allowcolorcodes then if string.find( teamName, "#%x%x%x%x%x%x" ) then local colorCodes = {} while( string.find( teamName, "#%x%x%x%x%x%x" ) ) do local startPos, endPos = string.find( teamName, "#%x%x%x%x%x%x" ) if startPos then colorCode = string.sub( teamName, startPos, endPos ) table.insert( colorCodes, { { getColorFromString( colorCode ) }, startPos } ) teamName = string.gsub( teamName, "#%x%x%x%x%x%x", "", 1 ) end end content = { teamName, colorCodes } else content = teamName end else content = teamName end else content = getElementData( team, column.name ) end content = iif( content and column.name ~= "name" and type( content ) ~= "table", tostring( content ), content ) if column.textFunction then if content and column.name == "name" and type( content ) == "table" then content[1] = column.textFunction( content[1], team ) else content = column.textFunction( content, team ) end end teamSortTable[teamSortTableIndex][column.name] = content teamSortTable[teamSortTableIndex]["__SCOREBOARDELEMENT__"] = team end teamSortTableIndex = teamSortTableIndex + 1
  20. Julian09123

    team

    Que se supone que haga? Aca esta la linea 400, y ahora? http://oi63.tinypic.com/2elw6fr.jpg
  21. Julian09123

    team

    Hola, amigos tengo este codigo el cual anda bien pero quiero que al que no haya nadie en el tab, se salga el team osea el nombre, como podria hacerlo? function createAdminTeamOnStart () team = createTeam ( "uR# Underground Riders", 81, 91, 111 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("#uR")) then setPlayerTeam(source, team) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler function getOutFromTeam() if source then setPlayerTeam(source, nil) end end addEventHandler("onPlayerLogout",getRootElement(),getOutFromTeam)
  22. Gracias alvarez, si estaba ahi. Gracias tomas igualmente.
  23. En donde lo deberia poner?
×
×
  • Create New...