Jump to content

AJXB

Members
  • Posts

    370
  • Joined

  • Last visited

  • Days Won

    2

AJXB last won the day on November 24

AJXB had the most liked content!

Details

  • Gang
    Not MTA
  • Location
    Vancouver
  • Occupation
    Software Engineer
  • Interests
    Food

Recent Profile Visitors

2,797 profile views

AJXB's Achievements

Street Cat

Street Cat (24/54)

21

Reputation

  1. Very cool! And to be done with limited resources is great!
  2. AJXB

    Introducing AI

    Thank you! Yes, I just added the Github link: https://github.com/MrgSub/mtasa-ai
  3. AJXB

    Introducing AI

    Use AI in your MTA:SA resources. Powered by providers like OpenAI, Anthropic & Groq. You can now bake Artificial Intelligence into your resources, gamemodes and systems. This resource exports the below functions: init(config) generateText(prompt,system) generateObject(prompt, system) getProviders() getModels(provider) getConfig() Example usage: The below code initializes the AI agent (add your API key from the provider) and creates a ped and a marker. when the player hits the marker, the ped says something funny. addEventHandler("onResourceStart", resourceRoot, function() AI.init({ api_key = "", provider = "groq", model = "llama3-8b-8192", temperature = 0.7, max_tokens = 150 }) createPed(0, 0, 0, 5) local marker = createMarker(0, 0, 2, "cylinder", 5, 10, 244, 23, 10, root) local function handleMarkerHit(hitElement) local elementType = getElementType(hitElement) if elementType ~= "player" then return end local playerName = getPlayerName(hitElement) outputDebugString("Player "..playerName.." hit marker") AI.generateText(playerName.." got close to you, say something funny, and out of pocket. Limit is 255 characters. Your name is Pedro. Don't use quotes.", "You are a random pedestrian living in San Andreas, grand theft auto.")( function(result, error) if error then outputDebugString("Error: " .. error) return end if (result:len() >= 254) then result = result:sub(1, 254) .. "..." return end outputChatBox("[Pedro]: "..result, hitElement, 255, 255, 255) end ) end addEventHandler("onMarkerHit", marker, handleMarkerHit) end ) Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18946 Roadmap: - Support conversation history - Support streaming - Contributing: Contributions are welcome on Github: https://github.com/MrgSub/mtasa-ai
  4. He's talking about bots to replace players and you're talking about creating peds. Not the same thing
  5. Get the default acl.xml file and try again?
  6. The healthy thing to do is to make one resource and just export the functions. Otherwise, you're just repeating code and that's useless.
  7. Way to reinvent how Lua comments are supposed to be.
  8. Wow that's so cute that you don't wanna use leaked sources.. lmfao I can make the entire gamemode in no time, but are you paying well enough?
  9. And if I may ask, do you update the purchased resources for each client after you update the versions? Also, how are you protecting these resources from being leaked? (someone can purchase one resource and leak it since you're selling the source code, I presume)
  10. يا حبيبي مافي شي بالبرجمة اسمه "ما ضبط".. شو الخطأ؟ شي استوا؟
  11. They aren't useless, they look good, and your theme looks good. but if you think it's worth 200 euros, it's not. at least not to me. But I wouldn't be surprised if "clans" pay that much. Anyway, good luck
  12. First you wanted to trigger the event onWasted, then onDamage, now you're asking onWasted again. What. Do. You. Want?
  13. Or trigger an event when the player types anything and set a timer to reset the status
  14. local team = getTeamFromName('Players') setPlayerTeam(source,team)
×
×
  • Create New...