Search the Community

Showing results for tags 'call'.

More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 4 results

  1. CALL FUNCTION DOESN'T WORK I tried to use "handbrake" command from Vehicle System resource (link: 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? 😭
  2. Hi guys, im asking if i can get name of resource that called a function from another resource. --- function from resource1 function Func() outputChatBox("That function called by: ".. resourceName) -- print 'That function called by: resource2' end --- resource2 exports["resource1"]:Func()
  3. function outputChatBoxRemote ( playerName, message, type, serverport ) outputChatBox ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) return "hello sailor" end function finishedCallback( responseData, errno ) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString( "callRemote: ERROR #" .. errno ) elseif responseData ~= "hello sailor" then outputDebugString( "callRemote: Unexpected reply: " .. responseData ) else end end function playerChat ( message, type ) callRemote ( "", getResourceName(getThisResource()), "outputChatBoxRemote", finishedCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat ) This is the code, but does not working.. what wrong?
  4. Hi guys I was looking into: call and I was wondering, for example; you have the function outputChatBox("") which works both client and server side with the same name. Will I be able to do the same with exports. Example; Client function drawDxStuff () --dx stuff end addEvent("drawDxStuff", true) addEventHandler("drawDxStuff", getRootElement(), drawDxStuff) Server function drawDxStuff() triggerClientEvent(source, "drawDxStuff", source) --source would probably be the player calling the function end Meta <export function="drawDxStuff" type="server"/> <export function="drawDxStuff" type="client"/> Would this work or will this give an error cause they have the same name or for other reasons? Kind Regards