Search the Community

Showing results for tags 'vehicle'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • Open Source Contributors
    • Suggestions
  • General MTA
    • News
    • Media
    • Site/Forum/IRC/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Found 34 results

  1. Okey, so. There is this function called: getElementBoundingBox() But, is there any way to get the bounding box of a vehicle component? For example the bounding box of the wheel. Thanks for da' answers in advance.
  2. [Help] Random vehicle marker

    Hello MTA community! I need help with random vehicle spawner or marker. How can i make script, where i example drive through marker and it gives random vehicle to me? Please reply.
  3. a boolean value help me

    function showText() if not showing then if getKeyState('lalt') then showNearbyVehicleDescriptions() end return false end if not getKeyState('lalt') and getElementData(localPlayer, "enableOverlayDescriptionVehPin") ~= "1" then removeVD() return end for i = 1, #vehiculars, 1 do local theVehicle = vehiculars[i] if isElement(theVehicle) then local x,y,z = getElementPosition(theVehicle) local cx,cy,cz = getCameraMatrix() if getDistanceBetweenPoints3D(cx,cy,cz,x,y,z) <= viewDistance then --Within radius viewDistance local px,py,pz = getScreenFromWorldPosition(x,y,z+heightOffset,0.05) if px and isLineOfSightClear(cx, cy, cz, x, y, z, true, false, false, true, true, false, false) then --FETCH FONT IN REAL TIME local fontString = getElementData(localPlayer, "cFontVeh") or "default" local fontElement = fontString if fontElement == "BizNoteFont18" then if not BizNoteFont18 then BizNoteFont18 = dxCreateFont ( ":resources/BizNote.ttf" , 18 ) end fontElement = BizNoteFont18 end --INITIAL :~ local toBeShowed = "" local fontWidth = 90 local toBeAdded = "" local lines = 0 local textColor = tocolor(255,255,255,255) if getElementData(theVehicle, "carshop") then local brand, model, year = false, false, false brand = getElementData(theVehicle, "brand") or false if brand then model = getElementData(theVehicle, "maximemodel") year = getElementData(theVehicle, "year") local line = year.." "..brand.." "..model local len = dxGetTextWidth(line) if len > fontWidth then fontWidth = len end if toBeShowed == "" then toBeShowed = toBeShowed..line.."\n" lines = lines + 1 else toBeShowed = toBeShowed.."-~-\n"..line.."\n" lines = lines + 2 end else if toBeShowed == "" then toBeShowed = toBeShowed..getVehicleName(theVehicle).."\n" lines = lines + 1 else toBeShowed = toBeShowed.."-~-\n"..getVehicleName(theVehicle).."\n" lines = lines + 2 end end local price = getElementData(theVehicle, "carshop:cost") or 0 local taxes = getElementData(theVehicle, "carshop:taxcost") or 0 toBeShowed = toBeShowed.."Price: $"..exports.global:formatMoney(price).."\n Taxes: $"..exports.global:formatMoney(taxes) lines = lines+ 2 else --GET DESCRIPTIONS + SIZE local descToBeShown = "" local job = getElementData(theVehicle, "job") if job == 1 then descToBeShown = "RS Haul - We'll dump your load." lines = lines + 1 elseif job == 2 then descToBeShown = "Yellow Cab Co.\nCall #8294 for a pickup!" lines = lines + 2 elseif job == 3 then descToBeShown = "Los Santos Bus" lines = lines + 1 else for j = 1, 5 do local desc = getElementData(theVehicle, "description:"..j) if desc and desc ~= "" and desc ~= "\n" and desc ~= "\t" then local len = dxGetTextWidth(desc) if len > fontWidth then fontWidth = len end descToBeShown = descToBeShown..desc.."\n" lines = lines + 1 end end end if descToBeShown ~= "" then descToBeShown = "-~-\n"..descToBeShown lines = lines + 1 end --GET BRAND, MODEL, YEAR local brand, model, year = false, false, false brand = getElementData(theVehicle, "brand") or false if brand then model = getElementData(theVehicle, "maximemodel") year = getElementData(theVehicle, "year") local line = year.." "..brand.." "..model local len = dxGetTextWidth(line) if len > fontWidth then fontWidth = len end toBeShowed = toBeShowed..line.."\n" lines = lines + 1 end --GET VIN+PLATE local fiyatt = getElementData(theVehicle, "fiyat") local plate = "" local vin = getElementData(theVehicle, "dbid") if vin < 0 then plate = getVehiclePlateText(theVehicle) else plate = getElementData(theVehicle, "plate") end --Following edited by Adams 27/01/14 to accomodate VIN/PLATE hiding. if not noPlateVehs[getElementModel(theVehicle)] then if getElementData(theVehicle, "show_plate") == 0 then if getElementData(localPlayer, "duty_admin") == 1 then toBeShowed = toBeShowed.."((Plate: "..fiyatt.."))\n" lines = lines + 1 else --toBeShowed = toBeShowed.."* NO PLATE *\n" end else toBeShowed = toBeShowed.."Plate: "..fiyatt.."\n" lines = lines + 1 end end if getElementData(theVehicle, "show_vin") == 0 then if getElementData(localPlayer, "duty_admin") == 1 then toBeShowed = toBeShowed.."((VIN: "..vin.."))" lines = lines + 1 else --toBeShowed = toBeShowed.."* NO VIN *" end else toBeShowed = toBeShowed.."VIN: "..vin lines = lines + 1 end --GET IMPOUND if (exports["vehicle-system"]:isVehicleImpounded(theVehicle)) then local days = getRealTime().yearday-getElementData(theVehicle, "Impounded") toBeShowed = toBeShowed.."\n".."Impounded: " .. days .. " days" lines = lines + 1 end local vowner = getElementData(theVehicle, "owner") or -1 local vfaction = getElementData(theVehicle, "faction") or -1 if vowner == getElementData(localPlayer, "account:id") or exports.global:isStaffOnDuty(localPlayer) or exports.integration:isPlayerScripter(localPlayer) or exports.integration:isPlayerVCTMember(localPlayer) then toBeShowed = toBeShowed.."\nShop ID: "..(getElementData(theVehicle, "vehicle_shop_id") or "None") lines = lines + 1 local ownerName = 'No-one' if vowner > 0 then ownerName = exports.cache:getCharacterNameFromID(vowner) elseif vfaction > 0 then ownerName = exports.cache:getFactionNameFromId(vfaction) end local line = "\nOwner: "..(ownerName or "Loading..") local len = dxGetTextWidth(line) if len > fontWidth then fontWidth = len end toBeShowed = toBeShowed..line lines = lines + 1 --Activity / MAXIME local protectedText, inactiveText = nil if vowner > 0 then local protected, details = exports['vehicle-system']:isProtected(theVehicle) if protected then textColor = tocolor(0, 255, 0,255) protectedText = "[Inactivity protection remaining: "..details.."]" local toBeAdded = "\n"..protectedText toBeShowed = toBeShowed..toBeAdded local len = dxGetTextWidth(toBeAdded) if len > fontWidth then fontWidth = len end lines = lines + 1 else local active, details2, secs = exports['vehicle-system']:isActive(theVehicle) if active and (powner == getElementData(localPlayer, "dbid") or exports.integration:isPlayerStaff(localPlayer)) then --textColor = tocolor(150,150,150,255) inactiveText = "[Active | " local owner_last_login = getElementData(theVehicle, "owner_last_login") if owner_last_login and tonumber(owner_last_login) then local owner_last_login_text, owner_last_login_sec = exports.datetime:formatTimeInterval(owner_last_login) inactiveText = inactiveText.." Owner last seen "..owner_last_login_text.." " else inactiveText = inactiveText.." Owner last seen is irrelevant | " end local lastused = getElementData(theVehicle, "lastused") if lastused and tonumber(lastused) then local lastusedText, lastusedSeconds = exports.datetime:formatTimeInterval(lastused) inactiveText = inactiveText.."Last used "..lastusedText.."]" else inactiveText = inactiveText.."Last used is irrelevant]" end local toBeAdded = "\n"..inactiveText toBeShowed = toBeShowed..toBeAdded local len = dxGetTextWidth(toBeAdded) if len > fontWidth then fontWidth = len end lines = lines + 1 elseif not active then textColor = tocolor(150,150,150,255) inactiveText = "["..details2.."]" local toBeAdded = "\n"..inactiveText toBeShowed = toBeShowed..toBeAdded local len = dxGetTextWidth(toBeAdded) if len > fontWidth then fontWidth = len end lines = lines + 1 end end end end toBeShowed = toBeShowed.."\n"..descToBeShown end if fontWidth < 90 then fontWidth = 90 end --START DRAWING local marg = 5 local oneLineHeight = dxGetFontHeight(1, fontElement) local fontHeight = oneLineHeight * lines fontWidth = fontWidth*fontType[fontString][2] --Fix custom fonts px = px-(fontWidth/2) if getElementData(localPlayer, "bgVeh") ~= "0" then dxDrawRectangle(px-marg, py-marg, fontWidth+(marg*2), fontHeight+(marg*2), tocolor(0, 0, 0, 10)) end if getElementData(localPlayer, "borderVeh") ~= "0" then dxDrawRectangleBorder(px-marg, py-marg, fontWidth+(marg*2), fontHeight+(marg*2), 1, tocolor(255, 255, 255, 10), true) end dxDrawText(toBeShowed, px, py, px + fontWidth, (py + fontHeight), textColor, 1, fontElement, "center") end end end end end Problem Line : 117 local fiyatt = getElementData(theVehicle, "fiyat") ERROR : attempt to concatenate loca 'fiyatt' (a boolean value) Helpme pls.
  4. Bella rega. Sono un vero appassionato di Battle Bots. Ho trovato Tombstone in 3D ma devo editarlo tutto. Dal modello 3D alle Textures. Il modello originale e stato fatto con Sketchup, mancano tutte le textures ed altro. Ovviamente a lavoro ultimato la lama sarà scriptata in Lua
  5. Saludos a todos. Hace dos días que tengo el mismo problema y no puedo solucionarlo.. Resulta que tengo dos ordenadores, uno lo utilizo para mis creaciones y testear el servidor (PC sobremesa) Y el otro lo utilizo unicamente como host para el servidor. Dentro del ordenador de testeo todo funciona bien y sin errores. Pero al momento de transladar el servidor al ordenador que utilizo como host, aparece el siguiente error: ERROR: DayZ\Vehicle_spawns.lua:1805: attemp to call global 'getvehicleMaxFuel' <a nil value> Sé que es un error conocido por muchos, se forma cuando intentas spawnear un vehiculo desde el panel de admin (P) Esto genera que se malogre la base de datos del servidor (Internal.db) El problema es que como dije antes, en el servidor de testeo todo funciona perfectamente. Entonces, ¿Porque me aparece este error solo en el ordenador que utilizo como Host? He intentado con Eliminar, reemplazar y hasta reparar el Internal.db, pero hasta ahora nada ha funcionado, el error sigue apareciendo .. ¿Alguna idea?
  6. Better vehicle collisions/sync?

    I've created my first server just little over a while ago and I was wondering is there any way for me to implement better vehicle collisions between 2 players? Example: I'm in a car chasing another player in a car. I want to stop him so I try to perform a pit maneuver (ram my car into his car so that I would unsettle his car and spin him out) What's happening now: I ram my car into his car, he drives off as if nothing happened and I spin out, it's as if his car wasn't even in that position. Bad collisions between 2 player cars, as if the server doesn't sync vehicles properly. What I want to happen: I ram my car into his and he spins out. Good collisions between 2 players. Everything I see on my screen should appear the same on his screen. Server syncs vehicles properly and displays them as they are for all clients. I know that this is possible to do as I played on several servers that has this implemented. Talk to me like to a complete newbie, so far I have only started my server and added createVehicle, noblur and hedit scripts.
  7. Tudo bem? Bom não sei se to fazendo algo de errado desse script e tbm não sei se isso funciona. Eu estou tentando pegar o marker de um script.lua e levar para outro .lua exemplo crio o Marker do exemplo.lua e queria leva ele para o exemplo2.lua so que nao sei . Aqui esta o meu script de como estou fazendo Pegar o marker desse script. addEvent("opengui",true) function opengui_func() AgenciaT = guiCreateWindow(412, 90, 546, 486, "Agencia de Empregos", false) Aceitar = guiCreateButton(78, 436, 130, 27, "Aceitar", false, AgenciaT) Cancelar = guiCreateButton(348, 436, 130, 27, "Cancelar", false, AgenciaT) Lista = guiCreateGridList(53, 170, 451, 253, false, AgenciaT) guiGridListAddColumn(Lista, "Empregos", 0.3) guiGridListAddColumn(Lista, "Salários", 0.3) guiGridListAddColumn(Lista, "Cidades", 0.3) for i = 1, 2 do guiGridListAddRow(Lista) end guiGridListSetItemText(Lista, 0, 1, "Piloto", false, false) guiGridListSetItemText(Lista, 0, 2, "1500", false, false) guiGridListSetItemText(Lista, 0, 3, "Los Santos", false, false) guiGridListSetItemText(Lista, 1, 1, "Fazendeiro", false, false) guiGridListSetItemText(Lista, 1, 2, "1000", false, false) guiGridListSetItemText(Lista, 1, 3, "Los Santos", false, false) Messager = guiCreateMemo(48, 38, 451, 124, "Seja Bem Vindo a Prefeitura do Servidor, BRASIL TOP RPG para você começar a trabalhar precisa selecionar o emprego que você deseja trabalhar e apertar em Aceitar. Boa Sorte com seu novo emprego", false, AgenciaT) guiMemoSetReadOnly ( Messager, true) showCursor(true) addEventHandler("onClientGUIClick", Cancelar, function() destroyElement(AgenciaT) showCursor(false) end, false) function onGridListClick(source) local itemrow,itemcolumn = guiGridListGetSelectedItem(Lista) if itemrow ~= -1 then if guiGridListGetItemText( Lista, itemrow, 1 ) == "Piloto" then blip = createBlip ( 2003.5859375, -2401.1025390625, 13.546875, 42) outputDebugString("Blip visible distance: "..getBlipVisibleDistance(blip)) setBlipVisibleDistance(blip, 10000) -- Distancia Aeroporto LS outputChatBox("Local marcador vá até o [T]", source) destroyElement(AgenciaT) showCursor(false) else if itemrow ~= -1 then if guiGridListGetItemText( Lista, itemrow, 1 ) == "Fazendeiro" then Carro = createMarker (1482.3427734375, -1729.4150390625, 13.3828125 -1, "cylinder", 2, 255 ,0 ,0, 255) --Quero levar esse marker para outro .lua para pode spawna o veiculo triggerServerEvent(source, "trabalho", source, true) -- e aqui é quando leva para o script servidor bom nao se se é aqui o erro outputChatBox("Local marcador vá até o [T]", source) destroyElement(AgenciaT) showCursor(false) end end end end end addEventHandler("onMarkerHit",Carro,onGridListClick) -- o evento addEventHandler("onClientGUIClick", Aceitar, onGridListClick) end addEventHandler("opengui", root, opengui_func) E levar para esse script. local marker = createMarker(362.8115234375, 173.8154296875, 1008.3828125 -1, "cylinder", 1.5, 255, 0, 0) setElementInterior(marker, 3) function guioeffnen(player) triggerClientEvent(player, "opengui", player, true) end addEventHandler("onMarkerHit",marker,guioeffnen) function pegar (source) -- quero usar o marker de la para fazer essa função if isElementWithinMarker(source, Carro) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Islamico = true veh[source] = createVehicle(422,1481.083984375, -1730.6201171875, 13.3828125, 0, 0, 109.58242797852) warpPedIntoVehicle( source, veh[source] ) end addEvent("trabalho",true) end addEventHandler( "onMarkerHit",Carro, pegar )
  8. help me pls **sorry for my bad English**
  9. I'm trying to create a blip with a icon id of 51 in all the cars in my server, but as soon as I add more cars it starts lagging, how can I iterate through all of them without lagging?!
  10. [HELP]Vehicle Move

    How can I move a vehicle up to a certain point by having it follow the mta streets?
  11. VehicleExhaustPosition

    Hello, I would be that many servers that include modifications on vehicles, would agree with this suggestion. getVehicleExhaustPosition would get the current position of exhaust on vehicle, setVehicleExhaustPosition would change the position to correct place (to fit modifications on vehicles, such as adding custom bumpers or so), also setVehicleExhaustType for changing type, for example Infernus has only "exhaust" node in DFF file, but displays as two exhausts on each side, mirrored by axis of car. By changing type it would change to only one exhaust, or two. I don't really know how this works in handling, maybe it could be worked on somehow. Cheers, NoHear.
  12. function addPaintjob(commandName,paintjobID) me = getLocalPlayer() if isPedInVehicle ( me ) then triggerServerEvent ( "addPJ", resourceRoot, tonumber(paintjobID), me ) end end addCommandHandler ("addpaintjob",addPaintjob) function addPaintjob2(paintjobID,player) if paintjobID == 1 then myTexture = dxCreateTexture( "paintjob1.png" ) elseif paintjobID == 2 then myTexture = dxCreateTexture( "paintjob2.png" ) elseif paintjobID == 3 then myTexture = dxCreateTexture( "paintjob3.png" ) elseif paintjobID == 4 then myTexture = dxCreateTexture( "paintjob4.png" ) elseif paintjobID == 5 then myTexture = dxCreateTexture( "paintjob5.png" ) elseif paintjobID == 6 then myTexture = dxCreateTexture( "paintjob6.png" ) else if player == getLocalPlayer() then outputChatBox ("There is no such paintjob ID!") return end end engineRemoveShaderFromWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(player) ) shader_cars, tec = dxCreateShader ( "shader.fx" ) engineApplyShaderToWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(player) ) dxSetShaderValue ( shader_cars, "TX0", myTexture ) end addEvent( "addPJ2", true ) addEventHandler( "addPJ2", getLocalPlayer(), addPaintjob2 ) function removePaintjob2(player) if engineApplyShaderToWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(player) ) then me = getLocalPlayer() engineRemoveShaderFromWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(player) ) removePaintjob2(player) end end addEvent( "removePJ2", true ) addEventHandler( "removePJ2", getLocalPlayer(), removePaintjob2 ) function removePaintjob() triggerServerEvent ( "removePJ", resourceRoot, getLocalPlayer() ) end addCommandHandler ("removepaintjob",removePaintjob) It works everything to wonder, but when it comes to paintjob for certain imported vehicles you can not. How could you apply a paintjob to these vehicles? I do not want to change color, but have multiple skin... Thanks for you Attention
  13. Hey, When you're not moving your mouse while driving a vehicle, your camera will start to move back to the original "behind the vehicle" view. Is there any way I could cancel out that camera movement? I was working on something that allows the player to target a hydra while flying one himself (kinda like the GTA5 target/focus one), so it would be easier to fight each other. I made a small video explaining my problem, I hope that explains it a bit better. I really appreciate any help you can provide.
  14. vehicle reboot

    Üdv. Elkezdtem irni egy vehicle-systemet es amikor ujra inditom a resourcet akkor ugye lekene menteni ujbol az adatokat hogy a kocsihozz kosse. Bovebben, sql -bol kene a kocsihoz kotni egy id-t de nincs ra otletem igy oldottam meg amikor elkeszitem az autot. if isElement(cars) then local vehicleQuery = dbQuery(connect,"INSERT INTO vehicle SET owner= ? , type = ? , r=?, g=? , b=?, x= ? ,y = ? ,z = ? ", owner, vehicleModel, r,g,b,px,py,pz) local vehicleQueryResult, _, beszurtID = dbPoll(vehicleQuery, -1) if vehicleQueryResult then setElementData(cars, "kocsi:id", beszurtID) local kocsiID = getElementData(cars, "kocsi:id") for k,v in ipairs(result) do if v["id"] == tonumber(owner) then owner_name = v["charname"]:gsub("_", " ") owner_id = v["id"] setElementData(cars, "kocsi:owner", owner_name) setElementData(cars, "kocsi:owner:id",owner_id) end end end end Ilyesmivel probalkoztam.(nem jott be) function res_resource(resource) local qh_v = dbQuery(connect, "SELECT * FROM vehicle") local result_v = dbPoll(qh_v,-1) for k,v in pairs(result_v) do local car = createVehicle(v["type"],v["sx"],v["sy"],v["sz"]) local color = setVehicleColor(car,v["r"],v["g"],v["b"]) if isElement(car) then local vehicleQueryResult, _, beszurtID = dbPoll(result_v[k], -1) if vehicleQueryResult then setElementData(cars, "kocsi:id", beszurtID) local kocsiID = getElementData(cars, "kocsi:id") outputChatBox(tostring(kocsiID),source) end end end end addEventHandler("onResourceStart", root , res_resource)
  15. vehicles reboot

    Üdv. Elkezdtem irni egy vehicle-systemet es amikor ujra inditom a resourcet akkor ugye lekene menteni ujbol az adatokat hogy a kocsihozz kosse. Bovebben, sql -bol kene a kocsihoz kotni egy id-t de nincs ra otletem igy oldottam meg amikor elkeszitem az autot. if isElement(cars) then local vehicleQuery = dbQuery(connect,"INSERT INTO vehicle SET owner= ? , type = ? , r=?, g=? , b=?, x= ? ,y = ? ,z = ? ", owner, vehicleModel, r,g,b,px,py,pz) local vehicleQueryResult, _, beszurtID = dbPoll(vehicleQuery, -1) if vehicleQueryResult then setElementData(cars, "kocsi:id", beszurtID) local kocsiID = getElementData(cars, "kocsi:id") for k,v in ipairs(result) do if v["id"] == tonumber(owner) then owner_name = v["charname"]:gsub("_", " ") owner_id = v["id"] setElementData(cars, "kocsi:owner", owner_name) setElementData(cars, "kocsi:owner:id",owner_id) end end end end Ilyesmivel probalkoztam.(nem jott be) function res_resource(resource) local qh_v = dbQuery(connect, "SELECT * FROM vehicle") local result_v = dbPoll(qh_v,-1) for k,v in pairs(result_v) do local car = createVehicle(v["type"],v["sx"],v["sy"],v["sz"]) local color = setVehicleColor(car,v["r"],v["g"],v["b"]) if isElement(car) then local vehicleQueryResult, _, beszurtID = dbPoll(result_v[k], -1) if vehicleQueryResult then setElementData(cars, "kocsi:id", beszurtID) local kocsiID = getElementData(cars, "kocsi:id") outputChatBox(tostring(kocsiID),source) end end end end addEventHandler("onResourceStart", root , res_resource)
  16. Hi, I will doing job, but I always have got problem with arguments in trigger I read Elements Tree on wiki, but I still do not know what this is about When player hit marker then s-side must create vehicle. C-side StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer ) outputChatBox ("Created vehicle!") end end end addEventHandler ("onClientMarkerHit", StartJobM, StartJob) StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer ) outputChatBox ("Created vehicle!") end end end addEventHandler ("onClientMarkerHit", StartJobM, StartJob) S-side: function VehicleC() lcvehi = createVehicle (422, -158.49141, 1051.20691, 19.75892) end addEvent("poj") addEventHandler("poj", getRootElement(), VehicleC) Please, explain me how i Can triggering
  17. I created a Brown Streak mod. And the dff&txd working fine, but the .col does not working. I got a warning in debugscript 3: mod.lua:14: Bad 'number' pointer @ engineReplaceCOL'(2) This is the mod.lua code: function replaceModel() local txd colsok = engineLoadCOL ( "v43.col" ) engineReplaceCOL ( colsok, 538) txd = engineLoadTXD ( "v43.txd" ) engineImportTXD ( txd, 538 ) dff = engineLoadDFF ( "v43.dff" ) engineReplaceModel ( dff, 538 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) What wrong? How to fix this?
  18. help

    in my server when the vehicle is blast or destroy, that destroy vehicle is been for long time. i want a script which removes destroyed vehicle in 3 or 4 second . please help me
  19. how to block vehcile?

    help! can anyone tell me how to block rino and some vehicle. please......
  20. Well, this is recent, it was working fine, but now it stopped working, any solution? (arguments are right) no error in debug !
  21. Hello there, I've been trying to create a weapon (uzi) and attach it on a vehicle (hydra) the weapon should fire when I click the left mouse button. I am stuck at the very beginning of the script (trying to get the uzi to spawn) and I just cannot progress any further. function hydraGuns() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle)then if getElementModel(vehicle) == 520 then local x, y, z = getElementPosition(vehicle) local weapon = createWeapon("uzi", x, y, z) outputChatBox ("Hydra guns are installed") end end end What am I doing wrong?
  22. Problema MTA DAYZ

    Hola chicos, bueno ocupo una pequeña ayuda con este script del dayz el problema es el siguiente: Los autos funcionan perfecto y todo el problema es que no hay sonido únicamente quien maneja el vehículo lo escucha. --Esto es lo que tengo en el survivorSystem_client.lua function toggleEngine() if getPedOccupiedVehicleSeat(getLocalPlayer()) ~= 0 then return end veh = getPedOccupiedVehicle(getLocalPlayer()) vehCol = getElementData(veh,"parent") needengine = getElementData(vehCol,"needengines") needtires = getElementData(vehCol,"needtires") needrotor = getElementData(vehCol,"needrotor") needparts = getElementData(vehCol,"needparts") needglass = getElementData(vehCol,"needglass") engine = getElementData(vehCol,"Engine_inVehicle")or 0 tires = getElementData(vehCol,"Tire_inVehicle")or 0 rotor = getElementData(vehCol,"Rotor_inVehicle")or 0 parts = getElementData(vehCol,"Parts_inVehicle")or 0 fuel = getElementData(vehCol,"fuel") if needengine == engine and needtires == tires and needrotor == rotor and (fuel > 0) and needparts == parts then setVehicleEngineState(veh,not getVehicleEngineState(veh)) end if getVehicleEngineState(veh)== true then triggerEvent("displayClientInfo",getLocalPlayer(),"Vehicle","Engine started!",22,255,0) else triggerEvent("displayClientInfo",getLocalPlayer(),"Vehicle","Engine stopped!",255,22,0) end end bindKey("k","down",toggleEngine) Y esto -- Esto es lo de vehicle_spawns.lua function onPlayerEnterDayzVehicle(veh,seat) if seat == 0 then setVehicleEngineState(veh,false) outputChatBox("Press 'K' to turn the engine on/off!",source,255,255,255) end end addEventHandler("onPlayerVehicleEnter",getRootElement(),onPlayerEnterDayzVehicle) function onPlayerExitDayzVehicle(veh,seat) if seat == 0 then setVehicleEngineState(veh,false) end end addEventHandler("onPlayerVehicleExit",getRootElement(),onPlayerExitDayzVehicle) Gracias desde ya
  23. Alright so I'm trying to make vehicles more deadly. When a player or bot get hit by a vehicle I don't want the vehicle to bounce away but the player to fall 100% of the times (just by a simple touch) and then in some realistic sense loose health depending on the collision force. What function would you recommend? Are any of these properties useful for my needs? I'm thinking of collisionDamageMultiplier and onVehicleCollission for instance, would those be a good approach? have anyone done anything like this before?
  24. Request 5 HELP

    Can someone make me a script that on explode for example - plane wont disappear , but just on explode plane will become wreck....
  25. Vehicle cap position

    Hi! I want to create a fuel system. But I don't know how to calculate the cap's position. I know, that I can do it with getElementPosition, getElementRotation and Offset. But how?