Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by PiscioMastella

  1. Guys, thank you all! It seems to work... i didn't know i had to manage the life of bots as i saw they got killed sometimes... Still, i am a developer but never worked on Lua/MTA but i will be glad to help the community if i can
  2. I have created a test script to try setting it manually... will post the code function registerDamage ( attacker, weapon, bodypart , loss ) local reamainingHealth = getElementHealth(source); outputChatBox("Reamaining health "..reamainingHealth) if(reamainingHealth > 0) then setElementHealth(source, reamainingHealth) else setElementHealth(source, 0) end end addEventHandler ( "onClientPedDamage", getRootElement(), registerDamage ) I also found out this code snippet in the slothbot server functions... can it be bugged? function aida
  3. Hey, yes i already checked out but i don't have anything like that... but i can tell you that setElementHealth is not working (client side)
  4. I used the "Code Snippet", sorry. As it seems i can't edit the topic i will repost it! Test vanilla script 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) Slothbot script local skinIds = {136} local weaponIds = { 22, 33} local botTeams = { createTeam("bots1"), createTeam("
  5. 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 t
  • Create New...