1LoL1 Posted March 14, 2014 Share 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 ) Link to comment
Moderators IIYAMA Posted March 14, 2014 Moderators Share Posted March 14, 2014 Replace givePlayerBlood with setElementHealth. make sure you check if there is a killer. if killer then setElementHealth(killer,100) end Link to comment
1LoL1 Posted March 14, 2014 Author Share 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 Link to comment
DNL291 Posted March 14, 2014 Share Posted March 14, 2014 Try using: setElementData(killer, "blood", 100) Link to comment
1LoL1 Posted March 15, 2014 Author Share Posted March 15, 2014 Try using: setElementData(killer, "blood", 100) Adds nothing at all to kill them and 50 and nothing .. Link to comment
Moderators IIYAMA Posted March 15, 2014 Moderators Share 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) Link to comment
1LoL1 Posted March 15, 2014 Author Share 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 .. Link to comment
manawydan Posted March 15, 2014 Share Posted March 15, 2014 is just one "test" for know the string, whats mensage say? Link to comment
1LoL1 Posted March 17, 2014 Author Share Posted March 17, 2014 is just one "test" for know the string, whats mensage say? So anyone advise? Link to comment
Moderators IIYAMA Posted March 17, 2014 Moderators Share 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? Link to comment
1LoL1 Posted March 24, 2014 Author Share Posted March 24, 2014 So someone please help?? the damage that wrote it does not work .. Link to comment
WhoAmI Posted March 24, 2014 Share Posted March 24, 2014 This givePlayerBlood function is in resource that you are working in? If no, you have to export that function. Link to comment
1LoL1 Posted April 17, 2014 Author Share 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 .. Link to comment
Moderators IIYAMA Posted April 18, 2014 Moderators Share 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. 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