Jump to content

zkillreward help me


1LoL1

Recommended Posts

Posted

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
Posted

Replace givePlayerBlood with setElementHealth.

make sure you check if there is a killer.

if killer then 
setElementHealth(killer,100) 
end 

Posted
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 :)

  • Moderators
Posted

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)

Posted
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 ..

  • Moderators
Posted
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?

:?

  • 4 weeks later...
Posted
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
Posted
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. :roll:

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...