Jump to content

onPedWasted


dugasz1

Recommended Posts

Hello!

function died() 
    outputConsole("A ped die!") 
end 
addEventHandler("onPedWasted", getRootElement(), died) 

I wannt a function what si start at when a ped die. On the wiki its whit one ped(2th arg is the ped) but i want it whit all the peds. How its possible? (Client side event doesnt good)

Link to comment

Use server side.

Server side

function died() 
  
if getElementType(source)=="Player" then 
    outputChatBox("Player "..getPlayerName(source).. " died!") 
  
else 
     outputChatBox("A ped die!") 
end 
end 
addEventHandler("onPedWasted", getRootElement(), died) 

Link to comment

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