1LoL1 Posted March 14, 2014 Posted March 14, 2014 Hi, So I have one prozby can not remake this script? as instead of $ 100 would be added 100Blood I tried to remake it does not work if someone knew Please advise and if I could pray that it works on DayZ zombie Script: addEvent( "onZombieWasted" ); addEventHandler( "onZombieWasted", getRootElement(), function( killer ) givePlayerBlood( killer, 100 ); end )
Moderators IIYAMA Posted March 14, 2014 Moderators Posted March 14, 2014 Replace givePlayerBlood with setElementHealth. make sure you check if there is a killer. if killer then setElementHealth(killer,100) end
1LoL1 Posted March 14, 2014 Author Posted March 14, 2014 Replace givePlayerBlood with setElementHealth.make sure you check if there is a killer. if killer then setElementHealth(killer,100) end But dayz but not Health Blood
1LoL1 Posted March 15, 2014 Author Posted March 15, 2014 Try using: setElementData(killer, "blood", 100) Adds nothing at all to kill them and 50 and nothing ..
Moderators IIYAMA Posted March 15, 2014 Moderators Posted March 15, 2014 Well if you don't know the key, you can also detect it with this peace of code: addEventHandler("onElementDataChange",root, function (theName,oldValue) if getElementType(source) == "player" then outputChatBox("The string name: " .. theName .. " Old value: " .. oldValue,source) end end) setElementData(killer,"theName", 100)
1LoL1 Posted March 15, 2014 Author Posted March 15, 2014 Well if you don't know the key, you can also detect it with this peace of code: addEventHandler("onElementDataChange",root, function (theName,oldValue) if getElementType(source) == "player" then outputChatBox("The string name: " .. theName .. " Old value: " .. oldValue,source) end end) setElementData(killer,"theName", 100) It still does not add anything ..
manawydan Posted March 15, 2014 Posted March 15, 2014 is just one "test" for know the string, whats mensage say?
1LoL1 Posted March 17, 2014 Author Posted March 17, 2014 is just one "test" for know the string, whats mensage say? So anyone advise?
Moderators IIYAMA Posted March 17, 2014 Moderators Posted March 17, 2014 is just one "test" for know the string, whats mensage say? So anyone advise? Can't you read or are you blind? Or to lazy to follow somebody his advise, so you ask it again to get the same advice?
1LoL1 Posted March 24, 2014 Author Posted March 24, 2014 So someone please help?? the damage that wrote it does not work ..
WhoAmI Posted March 24, 2014 Posted March 24, 2014 This givePlayerBlood function is in resource that you are working in? If no, you have to export that function.
1LoL1 Posted April 17, 2014 Author Posted April 17, 2014 This givePlayerBlood function is in resource that you are working in? If no, you have to export that function. So please help me anyone? I know this is an old topic but I need it ..
Moderators IIYAMA Posted April 18, 2014 Moderators Posted April 18, 2014 This givePlayerBlood function is in resource that you are working in? If no, you have to export that function. So please help me anyone? I know this is an old topic but I need it .. We did, but you didn't listen.
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