Jump to content

Search the Community

Showing results for tags 'slothbot'.

  • 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


About Me


Member Title


Gang


Location


Occupation


Interests

Found 15 results

  1. Sometimes when i see peds on the screen some bugs occur, I have tested on several computers and the same bug happens, the bug can be reproduced with some popular scripts like npchlc_traffic, slothbot or zombies, and I have never found out that it can be Here is a video of the glitchy screen and a pic I need help, because i can't find any topic about this u_u
  2. AtendenteLoja1 = exports["slothbot"]:spawnBot (308.158, -143.091, 999.602, 0, PedModel, 7, 5) exports["slothbot"]:setBotAttackEnabled (AtendenteLoja1, false) O Bot da spawn, mas mesmo setando 'setBotAttackEnabled' pra false ele continua a bater, não da error nem warning, pq não esta funcionando?
  3. Hi guys, hope you are all good. I am scripting a pretty simple server based on the "play" gamemode, with a couple of mods and i would like to add some bots around the map (plus event/mission like on Arma/Dayz servers). I was scripting around using slothbot and i saw that sometimes the bots are invincible but i didn't give much importance to that because i had to clean my code. Then, i noticed that every bot was invincible. Thinking of a bug in my code, i removed my mods and tryied to create a ped using createPed but they are still invincible. I noted that the only way to kill them is using the knife (stealthkill). To develop the scripts i use a Windows PC meanwhile i have a "production" server based on Linux and it seems that bots get killed (sometimes) on the server. I also checked around and i aw a similar post but wasn't helpful. Other thing to note is that i do not manipulate health on any gameobject. Steps i tried to fix the bug: - reinstalling MTA - removing all teams from players/bots - deleting all server resources with a MTA clean install, creating only a simple resource to spawn a ped local weaponIds = {10, 22, 33} local started = false function initBotOnStreets(theResource) if(getResourceName(theResource) ~= "5bserver" or started) then return end outputDebugString("Spawno") createPed(136, 2320, -1737, 0) end addEventHandler ( "onResourceStart", getRootElement(), initBotOnStreets) - tried to play GTA and see if i could kill npcs This is my script (using slothbot) local skinIds = {136} local weaponIds = { 22, 33} local botTeams = { createTeam("bots1"), createTeam("bots2"), createTeam("bots3") } local locations = { { name = "nearGroveSt", x = 2313, y = -1737, z = 2, botNumer = 5 }, { name = "nearGroveSt1", x = 2320, y = -1737, z = 0, botNumer = 5 }, { name = "nearGroveSt2", x = 2313, y = -1757, z = 0, botNumer = 5 }, { name = "nearGroveSt3", x = 2323, y = -1747, z = 0, botNumer = 5 } } local knownBots = {} local started = false function initBotOnStreets(theResource) if(getResourceName(theResource) ~= "bot-killers" or started) then return end started = true -- createPed(136, 2320, -1737, 0) for key, location in pairs(locations) do for i = 0, location["botNumer"] do local posX = math.random(location["x"] - 20, location["x"] + 20) local posY = math.random(location["y"] - 20, location["y"] + 20) local skinId = skinIds[ math.random( #skinIds ) ] local weaponId = weaponIds[ math.random( #weaponIds ) ] -- local theTeam = botTeams[ math.random( #botTeams ) ] local theTeam = nil local bot = exports.Slothbot:spawnBot(posX, posY, location["z"], 0, skinId, 0, 0, theTeam, weaponId, "hunting", nil) local id = location["name"].."_"..tostring(i) setElementData(bot, "id", id) setElementData(bot, "pascLocName", location["name"]) -- setElementData(bot, "slothbot", true) table.insert(knownBots, {id}) end end end function respawnStreetBot() local id = getElementData(source, "id") if(isValueInTable(knownBots, id, 1)) then local locationName = getElementData(source, "pascLocName") for key, location in pairs(locations) do if(locationName == location["name"]) then outputDebugString("Respawning "..id) local posX = math.random(location["x"] - 50, location["x"] + 50) local posY = math.random(location["y"] - 50, location["y"] + 50) local skinId = skinIds[ math.random( #skinIds ) ] local weaponId = weaponIds[ math.random( #weaponIds ) ] local theTeam = botTeams[ math.random( #botTeams ) ] local bot = exports.Slothbot:spawnBot(posX, posY, location["z"], 0, skinId, 0, 0, theTeam, weaponId, "hunting", nil) setElementData(bot, "id", id) setElementData(bot, "pascLocName", location["name"]) end end end end addEventHandler ( "onResourceStart", getRootElement(), initBotOnStreets) addEvent("onBotWasted", true) addEventHandler ( "onBotWasted", getRootElement(), respawnStreetBot ) The gamemode script (pretty much the play gamemode with two or three lines changed): local vehiclesToSpawn = {} local spawnpoints = { {-711,957,12.4,90}, {2005,1543,13.5,270}, {2485,-1667,13.3,0}, {-2405,-598,132.6,128}, } local vehicleDestroyTimers = {} local validSkins = {0, 1, 2, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312} local _validSkins = {102,284,249} local playerVehicles = {} local playersTeam = createTeam("Camerati"); local function spawn(player) if player and isElement(player) then local x,y,z,r = unpack(spawnpoints[math.random(1,#spawnpoints)]) --spawnPlayer(player,x+math.random(-3,3),y+math.random(-3,3),z,r,validSkins[math.random(1,#validSkins)],0,0) spawnPlayer(player,2485+(math.random(-10,10)),-1667+(math.random(-10,10)),13.3,0+(math.random(-10,10)),_validSkins[math.random(1,#_validSkins)] ,0,0) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) giveWeapon ( player, 10, 200, true ) -- Gives dildo giveWeapon ( player, 31, 200, true ) -- Gives m4 giveWeapon ( player, 22, 200, true ) -- Gives m9 -- setPlayerTeam(player, playersTeam) end end local function onJoin() spawn(source) local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("E' entrato un CaMEMErata "..getPlayerName(source)) end end local function onWasted() local t = tonumber(get("playerRespawnTime")) or 5000 setTimer(spawn,(t > 50 and t or 50),1,source) end local function destroyPlayerVehicles() local vehicles = playerVehicles[source] for _,vehicle in ipairs(vehicles) do if isElement(vehicle) then destroyElement(vehicle) end end playerVehicles[source] = nil end local function onEnter(player) local t = tonumber(get("vehicleRespawnTime")) or 60000 source.damageProof = false source.frozen = false local vehicledata = vehiclesToSpawn[source] setTimer(createNewVehicle,(t > 50 and t or 50),1,vehicledata) vehiclesToSpawn[source] = nil if not playerVehicles[player] then playerVehicles[player] = {} addEventHandler("onPlayerQuit",player,destroyPlayerVehicles) end table.insert(playerVehicles[player],source) removeEventHandler("onVehicleEnter",source,onEnter) end local function destroyVehicle(vehicle) if vehicle and isElement(vehicle) and getElementType(vehicle) == "vehicle" then destroyElement(vehicle) end end local function destroyTimer() if vehicleDestroyTimers[source] and isTimer(vehicleDestroyTimers[source]) then killTimer(vehicleDestroyTimers[source]) end removeEventHandler("onVehicleEnter",source,destroyTimer) end local function onExit() local t = tonumber(get("vehicleExpireTime")) or 600000 vehicleDestroyTimers[source] = setTimer(destroyVehicle,(t > 50 and t or 50),1,source) addEventHandler("onVehicleEnter",source,destroyTimer) end function createNewVehicle(vehicledata) local m,x,y,z,r = unpack(vehicledata) local vehicle = Vehicle(m,x,y,z,0,0,r) vehicle.damageProof = true vehicle.frozen = true vehiclesToSpawn[vehicle] = vehicledata addEventHandler("onVehicleEnter",vehicle,onEnter) addEventHandler("onVehicleExit",vehicle,onExit) end local function initScript() resetMapInfo() local players = getElementsByType("player") for _,player in ipairs(players) do spawn(player) end for _,vehicledata in ipairs(vehiclesToSpawn) do createNewVehicle(vehicledata) end addEventHandler("onPlayerJoin",root,onJoin) addEventHandler("onPlayerWasted",root,onWasted) end addEventHandler("onResourceStart",resourceRoot,initScript) Does anyone have any idea about this? I have lost around 10h behind this without any success...
  4. Hello! I decided to create a script with bots. But I do not know the function (and if there is one at all) by which the bots would get into the car.
  5. Привет! Решил создать скрипт с ботами. Но я не знаю функцию (и есть ли она вообще),c помощью которой боты могли бы сесть в машину.
  6. I would like to know where I can find the slothbot script, because I want to know how it works, what the function looks like, etc.
  7. Alguém aí me ajuda ? Os Bots spawna, porém não me atacam DEBUG: Alien1 = {} Alien2 = {} Alien3 = {} function usarDroga (localPlayer) local x, y, z = getElementPosition(getLocalPlayer()) Alien1[localPlayer] = createPed(111, x+13, y+5, z) Alien2[localPlayer] = createPed(112, x+10, y+3, z) Alien3[localPlayer] = createPed(113, x+6, y+5, z) exports.slothbot:spawnBot(x, y, z, 1, Alien1[localPlayer], 0, 0, a, 0, "chasing", localPlayer) exports.slothbot:spawnBot(x, y, z, 1, Alien2[localPlayer], 0, 0, a, 0, "chasing", localPlayer) exports.slothbot:spawnBot(x, y, z, 1, Alien3[localPlayer], 0, 0, a, 0, "chasing", localPlayer) exports.slothbot:setBotAttackEnabled(Alien1[localPlayer], true) exports.slothbot:setBotAttackEnabled(Alien2[localPlayer], true) exports.slothbot:setBotAttackEnabled(Alien3[localPlayer], true) exports.slothbot:setBotChase(Alien1[localPlayer], localPlayer) exports.slothbot:setBotChase(Alien2[localPlayer], localPlayer) exports.slothbot:setBotChase(Alien3[localPlayer], localPlayer) end addCommandHandler("Usar", usarDroga)
  8. Here is the "nemesis" script: function boss ( ) Nemesis = exports [ "slothBot" ]:spawnBot ( -1935.5480957031, 665.44055175781, 47.0, 90, 312, 0, 0, Nemesis, 0, "chasing", true ) exports.extra_health:setElementExtraHealth ( Nemesis, 2500 ) outputChatBox ("Nemesis!!!") myBlip = (createBlipAttachedTo ( Nemesis, 23 )) setElementData ( Nemesis, "nemesis", true ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss ) In which line and what should I add to make the slothbot (nemesis) have any weapon? Please help :|
  9. I need help from you guys, I'm doing a script to drop moneyfrom pedestrians, but I can't. --[[ Triggers whenever a ped is killed ]]-- function killedPed(totalAmmo, killer, killerWeapon, bodypart, stealth, npc) -- Get profitability multiplier local probability_of_richness = math.random(1,1000) if probability_of_richness < 900 then probability_of_richness = 1 elseif probability_of_richness < 975 then probability_of_richness = 3 elseif probability_of_richness < 999 then probability_of_richness = 10 else probability_of_richness = 100 end -- Create a money pickup at the position of the dead bot local x,y,z = getElementPosition(source) npc[killer] = math.random(1,40)*probability_of_richness -- Max profit: $4´000 -- Make the pickup and make sure it's removed after 2 minutes if not picked up local pickup = createPickup(x, y, z, 3, 1212, 120000, npc[killer]) if pickup then setTimer(destroyMinutePickup, 120*1000, 1, pickup) addEventHandler("onPickupHit", pickup, givePickupMoney) end end addEventHandler("onPedWasted", root, killedPed) --[[ Destroy the pickup after given time ]]-- function destroyMinutePickup(pickup) if isElement(pickup) then removeEventHandler("onPickupHit", pickup, givePickupMoney) destroyElement(pickup) end end --[[ Make the robber wanted on money pickup ]]-- function givePickupMoney(plr) if not npc[plr] then npc[plr] = math.random(1,50) end removeEventHandler("onPickupHit", source, givePickupMoney) destroyElement(source) givePlayerMoney(plr, npc[plr]) -- Get wanted for stealing money setWl(source, round(wanted_level, 2), 10, "Você cometeu o crime de roubo") end
  10. I need script for Groove members (Bots) standing [On Groove Streets] and shooting to players (all players). This bots must have: -HP like normal player -Groove streets guns (Uzi,AK-47 and others) -Stand or walk in groove streets -20 Bots -Skins from GS Thanks for any reply's
  11. WARNING: if you have heart problems, don´t use this resource. Hello, today i come with a jeff the killer resource. This isn´t a simple boss, this is a boss with a screamer when he kill you. (if you are a principiant, maybe this going to be useful for you). This is the link https://community.multitheftauto.com/?p=resources&s=details&id=15227. You can find him in the "?" sign (He can´t be killed with a knife). Here you have some screenshots. This is the boss. This is the screamer. Hope you like
  12. The resource starts, but the bot does not spawn. function bot () team = createTeam ("AngryBots", 255,255,255) exports [ "slothBot" ]:spawnBot ( 2002.5241699219,1546.9384765625,13.5859375, 90, 124, 0, 0, 29, "waiting", true ) end addCommandHandler("bots",bot) <meta> <info author="Falke" version="2.0.0" type="misc" name="angrybots" description="This script will add Silent Hill to San Andreas" /> <script src="server.lua" type="server" /> <include resource="slothbot" /> </meta> Why does not the bot spawn?? Please, help me! Neither the "nemesi1" script is working now (it worked when i played MTA years ago...). I don't know what is happening ;-; *nemesi1: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5722
  13. Hello! I've downloaded latest Slothbot resource and spawned counple bots. Everything was fine till i noticed that if there's no obstacle between me and enemy, his firing won't make a projectile (or it does, but it looks random). In result players can stand in front of a slothbot while he is shooting at him at point blank range and the bullet projectiles aren't spawning.
  14. Hello, i need help i tried to attach a 3d sound to a slothbot ped but it doesn't work, the ped works nice and everything but the sound is not attached to him. Server side script: triggerClientEvent ( "JasonSoundClientEvent", root, jasonbot ) Client side script: addEvent("JasonSoundClientEvent", true) addEventHandler("JasonSoundClientEvent", root, function ( ped ) local jasonsound = playSound3D("sounds/jasonsound.mp3", -1633.8134765625, -2234.517578125, 31.4765625, true) setSoundMaxDistance( jasonsound, 50 ) setSoundEffectEnabled(jasonsound, echo, true) setSoundVolume(jasonsound, 1) attachElements(jasonsound, ped) end) Why it doesn't work? Nvm fixed lol i had AttachElements and is attachElements because A doesn't work xDDDD
  15. Mta

    AYUDAA

    Hola a todos, espero que me puedan ayudar quiero hacer un Slothbot que me siga y que tenga un Dx arriba que le muestre la vida actual y cada 15 minutos explota y quiero que tire una roca para mi servidor de Mta espero que me puedan ayudar gracias.
×
×
  • Create New...