Jump to content

Willy

MTA Contributors
  • Posts

    118
  • Joined

  • Last visited

Posts posted by Willy

  1. If the second computer is on the same network as the first computer you will need to connect to the server using a LAN ip, which may look something like this: "192.168.0.*" Connect to your router (see an online manual for your router) and find out LAN ip the computer you are using as a server has been designated, then type that into the "Host:" box.

  2. before you connect to a server (when you are on the main menu screen) press f8 (to open the console) and type "window" (without the quotes) this then allows you to connect to a server with your game windowed and you can successfully minimise your game.

  3. looking at that you have added an ip address to the mtaserv.conf (). You can leave this blank.

    I guess that you are running the server on your local computer, use quick connect and type "localhost" (without quotes) into the "host:" box, your port (22005) in the box to the right of the one that says host: and then your server password in the "pass:" box.

  4. don't double post...

    there are people who would be willing to help you if you have specific questions and after you have tried to do it yourself.

    These people can be found in the scripting section of this forum, and on the #mta.scripting channel on irc.

  5. oh dear...

    no...

    it really isn't that hard. why don't you have a think about it, maybe read about xml for a while?

    an alternative would be to actually look at the acl file you are editing and see if you can find a bit that already says the bits you just added.

    Also the will only work if that's the name you used to register and log in to the server in question.

  6. "" goes in the meta.xml (as it says on the link you posted).

    You can also put the vehicles in a .map file (same syntax as an .xml file but mta recognises it as a map) and you would put in your meta.xml (if your vehicles file was called vehicles.map).

    Your map file may look like this:

    <map> 
       <vehicle model="400" posX="1710" posY="-1354" posZ="13" rotX="359" rotY="5" rotZ="3"/> 
    </map> 
    

    which would place a vehicle at the given position and rotation, of the specified model. Add more tags to add more vehicles.

  7. This function will fade a player's camera to a color or back to normal over a specified time period

    I don't think that fadecamera does anything other than fade to opaque and back to normal... if you wanted a green tint i would suggest tiling a 1*1 semi transparent .png over the whole screen using guiCreateStaticImage... I can't think of another way of doing it.

  8. A few things you could do to get people to be able to help are; tell us your operating system, I am guessing it is WIndows Vista, and tell us EXACTLY what the error message is and when it appears (a screenshot seems to be the best way to do this).

  9. I would recommend using a table, as you can store functions within tables.

    For your example you should be able to do something similar to the following:

      
    table = { 
         button = {label="a button",  onClick = function() outputChatBox("OMGZ BUTTON CLICKAGENESS!") end }  
    } 
      
    

    then table.button.onClick would be your function that you should be able to stick in the eventhandler... not 100% on that one tho - you would need to test it out. (i can't as i'm not at home).

  10. I'm going to have to disagree, i've recently written a script and it was a toss up between xml or lua tables, and it turns out that tables were by far the best to use. Once you realise the power of tables XML becomes as insignificant as Brophy's sexual advances.

  11. download this file: http://www.pinkboxstudio.com/lua.api

    put it in your notepad++/plugins/APIs/ directory.

    in notepad++ go into settings->style configurator select lua in the language scroll list, select one of the styles (i use FUNC1) in the style scroll list and copy and past all of the functions in the lua.api file (you can open it in notepad++) into the "user defined keywords" box.

    You now have both colour coded MTA functions, and auto complete (by starting to type a function and then pressing ctrl+space).

    fin!

    EDIT: this may be an old list (and is definitely not complete for DP3 functions)

  12. bool setBlipColor ( blip theBlip, int red, int green, int blue, int alpha )

    local theplayer = getPlayerFromNick ( name ) 
    setBlipColor ( theplayer, 0, 0, 0, 0 ), 
    

    your example won't work because you've got "theplayer" which isn't a blip, its a player.

    You might want this:

    function getBlipAttachedTo( thePlayer ) 
            local blips = getElementsByType( "blip" ) 
            for k, theBlip in ipairs( blips ) do 
                    if getElementAttachedTo( theBlip ) == thePlayer then 
                            return theBlip 
                    end 
            end 
            return false 
    end 
      
    

    and then do:

    local theplayer = getPlayerFromNick ( name ) 
    local theplayerblip = getBlipAttachedTo(theplayer) 
    setBlipColor ( theplayerblip, 0, 0, 0, 0 ) 
      
    

    the example on this page might be useful: http://development.mtasa.com/index.php?title=GetColorFromString

×
×
  • Create New...