• Content Count

  • Joined

  • Last visited

Posts posted by Swagy

  1. So basically, all I want to do is to Apply a vehicle mod to a certain vehicle.

    For example I use:

    local vehicle  = createVehicel(id, x,y,z)

    and then I want that vehicle mod to be replaced, but not all the vehicles with same Vehicle ID would be modded.

    I don't want to use shaders, because I'm willing to change the DFF file so.

    I don't really know how to express it xD but I hope you got what I meant

  2. Oh right thanks alot Zango,

    Is this what am I looking for tho ?

    function getMatrixLeft(m)
        return m[1][1], m[1][2], m[1][3]
    function getMatrixForward(m)
        return m[2][1], m[2][2], m[2][3]
    function getMatrixUp(m)
        return m[3][1], m[3][2], m[3][3]
    function getMatrixPosition(m)
        return m[4][1], m[4][2], m[4][3]
    local mat = getElementMatrix(element)  -- Get the matrix
    x,y,z = getMatrixLeft(mat)     -- Get the matrix left direction
    x,y,z = getMatrixForward(mat)  -- Get the matrix forward direction
    x,y,z = getMatrixUp(mat)       -- Get the matrix up direction


  3. So as the title says, I'm trying to make a gallery script and I'm trying to figure out a way to access Client's screenshots (MTA files from his computer) if there is anyway to do that please mention it

    or if you have any alternative idea I'm glad to hear it :D

  4. You can make your own Friendlyfire code tho which is going to be client sided.


    function friendlyFire (attacker)
      if (isElement(source)) and (isElement(attacker)) and (getElementType(attacker) == "player") and (getElementType(source) == "player") then
      local aTeam = getPlayerTeam(attacker)
      local sTeam = getPlayerTeam(source)
      if (aTeam == sTeam) then
    addEventHandler("onClientPlayerDamage", root, friendlyFire)



  5. you can try to introduce tables, this way:


    for i=550,20000 do
    for k,objects in ipairs(garageObjects) do -- garageObjects table is already defined and with values
      	local loadedObjects = {}
    	local a,b,c,d,e,f,g,h,i = unpack(objects)
    	local object = createObject ( a,b,c,d,e,f,g )
        table.insert(loadedObjects, object)
    	setObjectScale(object,h or 1)
    	setElementDoubleSided(object, i or false )
    if (#loadedObjects >= #garageObjects) then
      	loadedObjects = {}


    In this case, fadeCamera will be executed only when all the objects were created.


    PS: setGarageOpen only opens the garage door.

  6. On 16/10/2018 at 10:06, Dzsozi (h03) said:

    Yes, I also believe that.

    Sorry, what do you mean by that? With the export functions you get the middle position of the defined vehicle's bed. So from that point on, you can adjust the position of the object by adding or extracting values to/from the position you got.

    Really appreciate your help, thanks.


    Keep up the good work mate, I loved this resource.

    • Thanks 1