Jump to content

Search the Community

Showing results for tags 'onclientresourcestart'.

  • 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
    • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 2 results

  1. It's because of the onClientResourceStart event, but i dont know why its triggering it twice. Thanks function create() triggerServerEvent ( "create_s", resourceRoot) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), create) and the server function create_s() outputChatBox("lol") end addEvent("create_s", true) addEventHandler("create_s", resourceRoot, create_s)
  2. Hello I'm creating a script that will trigger an event if a resource started. Serverside addEventHandler("onResourceStart", resourceRoot, function() local accResource = getResourceFromName("accounts") if (accResource) then outputServerLog("Initializing account resource.") startResource(accResource) -- start another res here else shutdown("Didn't find a required resource 'accounts' from the server. Shutting down...") end end ) Clientside function initStartup(resource) --outputChatBox( getResourceName( resource ) ) if (getResourceName(resource) == "accounts") then triggerEvent("accounts:initStartup", localPlayer) end end end addEventHandler("onClientResourceStart", root, initStartup) The problem is on the clientside, the 'accounts' resource isn't started. But, in server the 'accounts' resource has been started. So i cant trigger the "accounts:initStartup" event. I have no idea why, so maybe someone can help me, thanks
×
×
  • Create New...