yanvr Posted March 6, 2012 Posted March 6, 2012 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
yanvr Posted March 6, 2012 Author Posted March 6, 2012 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 )
Castillo Posted March 6, 2012 Posted March 6, 2012 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 )
Kenix Posted March 6, 2012 Posted March 6, 2012 local team = terrorist Your variable terrorist is defined?
yanvr Posted March 6, 2012 Author Posted March 6, 2012 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
Castillo Posted March 6, 2012 Posted March 6, 2012 And you haven't renamed the "extrahealth" resource to something else?
12p Posted March 7, 2012 Posted March 7, 2012 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?
Castillo Posted March 7, 2012 Posted March 7, 2012 @yanvr: You have set the bot script as a server side script in meta.xml, right?
yanvr Posted March 7, 2012 Author Posted March 7, 2012 (edited) Yes extrahealth resource is running when the bot is start Edited April 30, 2012 by Guest
Castillo Posted March 7, 2012 Posted March 7, 2012 Why are you exporting the function: "spawnBot" which doesn't exists (that's not the problem anyway).
yanvr Posted March 7, 2012 Author Posted March 7, 2012 Really i don't know the resource has been reedited by me and my neighbor it's my friend.
Castillo Posted March 7, 2012 Posted March 7, 2012 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.
yanvr Posted March 9, 2012 Author Posted March 9, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now