12p Posted July 23, 2010 Share Posted July 23, 2010 Hi, men. I'm making a kind of "SA mistery" (Nemesis, in this case) and I need that all you help me. I want to set the Nemesis health to 100.000. Is this possible? And how? Of course I used: setElementHealth (nemesis, 100000) But it doesn't work. And I don't want infinite health, like this: function healing () setElementHealth (nemesis,100) end setTimer (healing,1,0) Look, this is my code (I'm using slothbot, thanks sloth): addEventHandler ("onResourceStart",getRootElement(), function () nemesis = exports.slothbot:spawnBot(-1918.25,660.35,46.56,90,103,0,0,nil,36,"hunting") end) Any way to set Nemesis health to 100.000? I will wait an answer. Thanks beforehand. Link to comment
AeroXbird Posted July 23, 2010 Share Posted July 23, 2010 That unlimited health script will just lag your server like hell. If i am right, it is not possible to increase the health on peds, For players i am sure that the limit is 200, so i suggest you to try 200 on your peds. Link to comment
12p Posted July 23, 2010 Author Share Posted July 23, 2010 Then... There is no way to set Health up from 200... u.u Well. Thanks. Link to comment
AeroXbird Posted July 23, 2010 Share Posted July 23, 2010 As far as I know there isn't no. But you can make a script that will reset the health a few times once it hits 100, but i don't think that will be very efficient. Link to comment
MaddDogg Posted July 23, 2010 Share Posted July 23, 2010 (edited) Just make use of a canceling of OnClientPedDamage. That would make someone invincible, if that's what you want.. Also, this: setTimer (healing,1,0) wouldn't work, because the minimal value for the time if 50ms, as stated here. Edited July 23, 2010 by Guest Link to comment
AeroXbird Posted July 23, 2010 Share Posted July 23, 2010 @Maddog How do you want to cancel the clientside-health of a ped serverside ped? Link to comment
12p Posted July 23, 2010 Author Share Posted July 23, 2010 Also, this: setTimer (healing,1,0) wouldn't work, because the minimal value for the time if 50ms, as stated here. LOL, I didn't use that value (1), just used it as example. What about this? addEventHandler ("onResourceStart",getRootElement(), function () nemesis = exports.slothbot:spawnBot(-1918.25,660.35,46.56,90,103,0,0,nil,36,"hunting") setElementData (nemesis,"deaths",0) end) addEventHandler ("onPedWasted",getRootElement(), function () local deaths = getElementData(source,"deaths") if exports.slothbot:isPedBot (source) and getElementData (source,"deaths") < 5 then setElementHealth (source, 100) setElementData (source,"deaths",deaths+1) end end) May it work? Link to comment
MaddDogg Posted July 23, 2010 Share Posted July 23, 2010 Didn't notice that it was serverside, but does it have to be? You could just create a ped for every player. But I actually don't know, what you're planning to do with the ped, so... Link to comment
12p Posted July 23, 2010 Author Share Posted July 23, 2010 Yeah, It's needed to be serverside, because I don't want to create 6 Nemesis bots D: What I want to do with them? Let them fight palyers using their Rocket Launchers, like in RE3. Link to comment
AeroXbird Posted July 23, 2010 Share Posted July 23, 2010 I suggest you to make a little more peds then, because that will take about the same time to kill. Link to comment
DiSaMe Posted July 23, 2010 Share Posted July 23, 2010 @MaddogHow do you want to cancel the clientside-health of a ped serverside ped? What's wrong with that? Damage is done client-side. What the server gets is a result from syncer. Link to comment
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