Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

Posts posted by Et-win

  1. Hai all,

    I'm testing out some filming and rendering on my computer and actually wondered what you think of this quality.

    (This is not my map!)

    Any tips about getting the quality better are welcome~

    • Like 1
  2. --Usage: HEX Colors without # 
    

    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 
    

  3. Clan War System

    -Version 1.2.0-

    Released!

    So after a year of not scripting anything anymore, I felt like scripting again. So, I edited Clan War System again. Have fun with the update!

    Changelog since version 1.1.1

    1.2.0

    16-07-2016

    +Added 'client_config.xml' to change the client's default binds/commands when not set any

    +Added the functionality to be able to scroll through the Maps-To-Play List when the status is 'started'

    +Added the functionality to Management Panel that everyone is able to see the Maps-To-Play List

    +Added the functionality to the Maps-To-Play List that you now can see which maps have to be played, is being played and have been played

    +Added the functionality to the Map Switch System that the 'Next is LIVE' only starts the Clan War when you finish a map according to the saved settings of CWS

    *Changed the Map Switch System and Check End Of Map System in order to make the two functionalities noted above here working, which also maybe fixes the rare skipping-maps bug

    *Fixed the Updater, since it couldn't receive the downloadable-list anymore

    *Fixed Scoreboard Deluxe's Alive-text, which was always visible when hiding the scoreboard on setting 'Fade'

    *Fixed the bug which didn't give the last team alive a point when a full team left the server on the last map of the Clan War

    *Fixed the bug when a full team left the server the status got 'stopped' instead of 'paused', which resetted the score

    *Fixed the bug when a team died and got the win-point, followed by the full team rejoining and CWS would play the map again and another point could be won

    *Fixed some messages and texts in the languages

    *Cleaned the scripts a little bit

    *Changed the credits

    -Removed the changing car- and blip-colors when the status is not 'started'

    (Date/Month/Year)

    For the people who want the score to be points (eg: 1st: 15 points, 2nd: 13 points, etc): To add this feature, the whole "mapHandler" and "scoreChange" (As I called them) handlers have to be rebuild, which is too much work. Maybe, -very- maybe, a version 2.0.0 will be made, and then it's easier to add this feature.

    About the "mapHandler" (Map Switch System): I couldn't find any bug which causes it to skip maps sometimes. Only when the race/mapmanager resource skip a map, CWS will play the map it will get switched to. Also when a map has respawn, it will fail because when a player respawns, CWS will see it as an alive-player.

    Be sure your server DOES support the last-player RACE:DM function (Change map when everyone is dead) if you have this enabled in CWS. If you see the bug happening again, check if it happens with the same map constantly. If so (And if not), share the map and it will be checked! (Send as much information as you can, since it's hard to find the bug because it does not always happen)

    Also I hope I have tested the Map Switch System, Check End Of Map System and Score System enough to be sure there are no bugs in it anymore. (Since I have edited them roughly) So if you see them, report them!

    Don't forget to report bugs, glitches, typo's, idea's, suggestions or more!

    Have fun!

  4. http://cegui.org.uk/wiki/The_Beginners_ ... II#Imagery

    As far as I understand, it works like this:

    --tl = Top Left, t = Top, tr = Top Right 
    --l = Left, bg = Middle, r = Right 
    --bl = Bottom Left, b = Bottom, br = Bottom Right, 
    --Usage: HEX Colors without #: AARRGGBB (Alphax2, Redx2, Greenx2, Bluex2) 
    --Example: 
    guiSetProperty(image, "ImageColours", "tl:0000FF00 tr:FF00FF00 bl:FF00FF00 br:0000FF00") 
    

    So, if you want to use your nametag-colors:

    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 
      
    local rr, gg, bb,aa = getPlayerNametagColor(g_Me) 
    local hex = RGBToHex(rr,gg,bb) -- (255, 255, 0, 0) red color 
    guiSetProperty(player.gui.mapBlip, "ImageColours", "tl:FF"..tostring(hex).." tr:FF"..tostring(hex).." bl:FF"..tostring(hex).." br:FF"..tostring(hex)) 
    

  5. hello everyone, for example I use this in a serverside or in a compiled script
    outputChatBox("Héllô", source, 255, 0, 0, true)  
    

    when I start script, it says problem of symbols..., how can I use extra codes?

    outputChatBox("Héllô", source, 255, 0, 0) 
    

    You know that the 'true' is only to make HEX (#FFFFFF) colors working?

  6. function Invitar (source) 
        local favteam = getTeamFromName("Police") 
            local player = getPlayerFromName(source) 
        if (favteam) then  
            setPlayerTeam(player, favteam) 
        outputChatBox (getPlayerName(player) .. ' #00FF00has been invited to Police', source, r, g, b, true ) 
        outputChatBox (getPlayerName(source) .. ' #00FF00has changed to Police', player, r, g, b, true ) 
        else 
        cancelEvent() 
        outputChatBox ( "", thePlayer, 0, 245, 82, true ) 
       end 
    end 
    addEvent( "Invitar", true) 
    addEventHandler( "Invitar", getRootElement(), Invitar )  
    

    1: r, g and b are not defined (In this function, maybe outside the function?)

    2: Why would you use 'cancelEvent()' as it doesn't stop anything?

    3: Sorry that I say it, but you have no idea what you are doing since this is just copied? :roll:

    Anyway, like N3xT said. Instead of putting the player into the team, you can use 'setElementData' and set the team-name or team-element on the player. Then with another function (addCommandHandler) check if there is element data with 'getElementData'. If there is, check if the team still exists and if so, place the player into the team.

  7. No, in 'destructionderby.lua' you have the line:

    showMessage(getPlayerName(activePlayers[1]) .. ' is the final survivor!', 0, 255, 0) 
    

    at line 73. If I only would want to edit this text, I would remove the line and create my own 'dxDrawText' function and effects and put them in this file. Instead of giving this message, start a render and play a 'dxDrawText' function with effects or so.

  8. At the moment I think it adds 1 point for each team when the team wins. In RaceLeague it adds for example 15 points from 1st finished player, then 13 points from 2nd finished, etc. And the score goes beyond 400 for a team sometimes.

    Ow I thought about that, but never knew how the system worked. Eg how many points etc.

    first need to make old stuff working again.

    Yup, if I ever have time :roll:

  9. I made it on the most stupidest way you can make it: Inside the compiled script. Anyway, it would be easy to link the default buttons to a .xml file (meta.xml) instead of inside the script, so, could you at least test the script to check if it even still works properly? It doesn't work correctly in my server or the server is just not set-up correctly (Just before I work on anything lol) :lol:

    Well from what I've seen it works but another player said that he has tried it and has had bugs in map switching and stuff like that. At the moment I'm using the RaceLeague resource and am ok with it...but I love yours' style :v Maybe you can also kind of make an option which doesn't just count score like on a football match, but more like the raceleague one. These are just suggestions, ignore 'em if you want :)

    PS I'd be happy to test the res if you need testing. I got a local server which is on whenever my PC is on (every day for some time :D) so that's no problem for me.

    And also I have suddenly map-switching problems after I started playing for fun again after a while of not playing, while it was just working fine when I released. Also hiding the "Alive" text with the scoreboard (Deluxe I believe) suddenly didn't work anymore. Ow well, it's still nice no one took the effort to report bugs though, making it hard to fix stuff.

    I see, as mine has a lot of more features, which makes the CW's much easier.

    What do you mean with "Maybe you can also kind of make an option which doesn't just count score like on a football match, but more like the raceleague one." ?

    Testing was never a problem, as I have 5 computers around. :roll: But always handy to let others test.

    Fixing my own script will be a hard search though, as my script is a maze and I have no idea what suddenly affected the map-switching and "Alive" text, but could be fixed for sure.

×
×
  • Create New...