dugasz1 Posted August 20, 2013 Posted August 20, 2013 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)
bandi94 Posted August 20, 2013 Posted August 20, 2013 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)
Moderators IIYAMA Posted August 20, 2013 Moderators Posted August 20, 2013 onPedWastedServerside event This event is triggered when a ped is killed or dies. It is not triggered for players. use onPlayerWasted as well.
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