Jump to content

Search the Community

Showing results for tags 'call function'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • 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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title





Found 3 results

  1. Currently, I'm trying to extract the D_Modu function from the client.lua file within the freeroam module and use it within the TurfSistem module. The purpose is as follows: when a player enters a turf area (onPlayerEnterTurf), their immortality should be disabled, and when they exit, it should remain disabled. That's all I'm asking for. I've been trying to fix this for about a week but haven't been able to find a solution. The file path for the TurfSistem module is [umoKlan]/TurfSistem, and for the freeroam module, it's [umoKlan]/freeroam. Additionally, there's another script named exports.lua, which is likely left there for adding new exports. Just to be thorough, I'll include the code blocks for all of them. My errors are as follows: [02:56:06] ERROR: [umoKlan]\TurfSistem\exports.lua:2: call: failed to call 'freeroam:D_Modu' [string "?"] [02:56:09] ERROR: [umoKlan]\TurfSistem\server.lua:146: attempt to call global 'D_Modu' (a nil value) [02:56:09] ERROR: [umoKlan]\TurfSistem\server.lua:179: attempt to call global 'D_Modu' (a nil value) My codes ; The server.lua file within the TurfSistem module function onColShapeHit(hit,dim) if not isElement(hit) or not dim then return end if getElementType(hit) ~= "player" then return end triggerClientEvent(hit,"TurfSistem:onClientPlayerEnterTurf",hit,id) triggerEvent("TurfSistem:onPlayerEnterTurf",hit,id) D_Modu(hitElement, true) removePedJetPack(hit) if isPedInVehicle(hit) then return end local klan = getPlayerKlan(hit) if not klan then return end local data = getElementData(source,"TurfBilgi") if not data then return end local id = data.id local klanlar = turfs[id].klanlar if not klanlar[klan] then klanlar[klan] = 1 else klanlar[klan] = klanlar[klan] +1 end if not data.saldiran then if klan ~= data.sahip then data.saldiran = klan end end -- triggerClientEvent(hit,"TurfSistem:onClientPlayerEnterTurf",hit,id) -- triggerEvent("TurfSistem:onPlayerEnterTurf",hit,id) if not isTimer(turfs[id].timer) then timerOlustur(id,hit) end end function onColShapeLeave(hit,dim) if not isElement(hit) or not dim then return end if getElementType(hit) ~= "player" then return end triggerClientEvent(hit,"TurfSistem:onClientPlayerExitTurf",hit,id) triggerEvent("TurfSistem:onPlayerExitTurf",hit,id) D_Modu(hitElement, false) local klan = getPlayerKlan(hit) if not klan then return end local data = getElementData(source,"TurfBilgi") if not data then return end local id = data.id local klanlar = turfs[id].klanlar if klanlar[klan] then klanlar[klan] = klanlar[klan] -1 end end The exports.lua file within the TurfSistem module local D_Modu = exports["freeroam"]:D_Modu() --local player = player-- oyuncu değişkenini belirtin --call(getResourceFromName("[umoKlan]"), "freeroam", player, "02") function D_Modu() return exports["freeroam"]:D_Modu(player) end The client.lua file within the freeroam module. -------------------- -----Player Godmode----- -------------------- ozellik1 = guiCreateCheckBox(5, 30, 130, 25, "Ölümsüzlük", false, false, panel) guiSetFont(ozellik1, "default-bold-small") -------------------------------------- -----Godmode Function----- ------------------------------------- local D_Modu = {} function D_Modu() if guiCheckBoxGetSelected(ozellik1) == true then triggerServerEvent("Alpha_Olma", getRootElement(), localPlayer) outputChatBox("#0066ffÖlümsüzlük Modu #FFFFFFAktif", 255, 255, 255, true) addEventHandler("onClientPlayerDamage", localPlayer, nodamage) addEventHandler("onClientRender", root, render) triggerServerEvent("Olumsuz_olma", getRootElement(), localPlayer) else outputChatBox("#0066ffÖlümsüzlük Modu #ffffffKapatıldı", 255, 255, 255, true) triggerServerEvent("Alpha_Olmama", getRootElement(), localPlayer) removeEventHandler("onClientPlayerDamage", localPlayer, nodamage) removeEventHandler("onClientRender", root, render) triggerServerEvent("Olumsuz_Olmama", getRootElement(), localPlayer) end end exports["freeroam"]:D_Modu() addEventHandler("onClientGUIClick", ozellik1, D_Modu, false) function nodamage() cancelEvent() end function render() if getPedWeaponSlot(localPlayer) ~= 0 then setPedWeaponSlot(localPlayer,0) end end I'm awaiting your comments on the codes provided. Please assist me.
  2. CALL FUNCTION DOESN'T WORK I tried to use "handbrake" command from Vehicle System resource (link: https://github.com/FlyingSpoon/vehicle-system). Of course, I've called to function, that I had to create either, because there were only command handlers, but the error kept showing up in console: failed to call 'vsys:handbrakeA'. IMPORTANT: I've added mark to meta file of Vehicle System that I want to export a function, even, I set one .Lua file to <shared>. (Server-side) function: function garage(player) local veh = getPedOccupiedVehicle(player) local x, y, z = getElementPosition(player) if veh then setElementPosition(veh, 4651.0595703125, -15999.06640625, -0.55000001192093) call(getResourceFromName("vsys"), "handbrakeA", player) call(getResourceFromName("vsys"), "parkA", player) removePedFromVehicle(player) setElementPosition(player, x, y, z) outputChatBox ("#09ff00Gotowe!", player, 255, 255, 255, true) else outputChatBox("#ff1100Musisz być w pojeździe!",player, 255, 255, 255, true) end end *Do not teleport urself to the coordinates! ? *outputChatBox messages translations: 1st - Done!, 2nd - You need to be in vehicle! CAN SOMEONE HELP, PLEASE? ?
  3. Okey, so i have made a script, a logging script, it logs litterally everything, and has 3 exported functions, they are used to create log files, but for some reason, when i want to call them from a separate script using call function["exports.*"] it just throws me an error.["failed to call 'fall_log:createLog'"].I can use the functions in the same script["fall_log"], but cant use somewhere else, for example in "fall_admin-system", indicating, that the script in "fall_log" works correctly, so any ideas?Here's my call[every argument is valid, and not not, if it matters.]: exports.fall_log:createLog("This is a test","fall_admin/log.json") I still dont rly want to give out the script for fall_log, but if i really need, then okey.
  • Create New...