Jump to content

extrahealth


yanvr

Recommended Posts

Posted

Hello, i creating a destructor ped with slothbot, but i have a problem with the EXTRAHEALT resource.

i don't know how use that resource. only want add extrahealth to my slothbot. please helpme

this is the extrahealt resource

https://community.multitheftauto.com/ind ... ls&id=1604

I started the extrahealt resource

and tried written this in my boss resource

setElementExtraHealth ( Bot, 9999 )

Don't work :'(

sorry for my bad english

Posted

local x = 1088.0643310547

local y = 1074.5938720703

local z = 10.838157653809

local skin=2

local weapon=38

local team=terrorist

local mode= "hunting"

local interior=0

local dimension= 0

local rot= 90

resourceRoot = getResourceRootElement()

function Destroyer (thePlayer)

call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject)

end

addEventHandler ( "onResourceStart", resourceRoot, Destroyer )

Posted
local x = 1088.0643310547 
local y = 1074.5938720703 
local z = 10.838157653809 
local skin = 2  
local weapon = 38 
local team = terrorist 
local mode = "hunting" 
local interior =0  
local dimension = 0 
local rot = 90 
  
function Destroyer () 
    local bot = call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) 
    exports["extrahealth"]:setElementExtraHealth(bot, 9999) 
end 
addEventHandler ( "onResourceStart", resourceRoot, Destroyer ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
local team = terrorist 

Your variable terrorist is defined?

Sorry but i don't know so variants. only can't delete "terrorist" or the ped will appear without weapon.

That resource haven't crated by me. We have only reedited another.

Castillo: thank's for help me but the destroyer has normal health.

I started the extrahealt resource and then the bosss plugin and nothing changes.

I dont know what is the problem.

my resource for extrahealth

https://community.multitheftauto.com/ind ... ls&id=1604

Posted

And you haven't renamed the "extrahealth" resource to something else?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I don't know then, maybe the resource is bugged.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I doubt it is bugged. I SCRIPTED IT, for the love of science, Castillo.

Maybe there's something missing. Are you running the extrahealth resource, right?

Posted

@yanvr: You have set the bot script as a server side script in meta.xml, right?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Why are you exporting the function: "spawnBot" which doesn't exists (that's not the problem anyway).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Maybe the problem is with the slothbots, because I added this after setting the extra health:

outputChatBox(tostring(exports["extrahealth"]:getElementExtraHealth(bot))) 

And it returned the correct value which is 9999.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Ooo man helpme please

we are trying to much things to set bot superlife.But dont works

I tried creating boss whit zombies but don't knowww :(

I view bots in servers whit extrahealth. How?

please tellme how can create a bossss

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...