#Paper Posted June 5, 2011 Posted June 5, 2011 It doesn't show any error: local chat = " #ff00cc>#ffcc00> " local dd = false function handleMapInfo(mapInfo) if string.find(name, "DD", 1, true) then dd = true else dd = false end end addEvent("onClientMapStarting",true) addEventHandler("onClientMapStarting",getRootElement(),handleMapInfo) function onContact(prev, current) if dd == true then if getElementType(current) == "player" then setElementData(getVehicleOccupant(source), "hitted", getPlayerName(source)) end end end addEventHandler ("onPlayerContact", getRootElement(), onContact) function onWastedShowKilled () if dd == true then if getElementData(source, "hitted") then outputChatBox(chat.."#ffffff"..getPlayerName(source).." has been killed by "..getElementData(source, "hitted").."!", getRootElement(), 255, 255, 255, true) end end end addEventHandler("onPlayerWasted", getRootElement(), onWastedShowKilled) My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
Aibo Posted June 5, 2011 Posted June 5, 2011 onPlayerContact source is a player. why getVehicleOccupant(source)? ?
Jaysds1 Posted June 5, 2011 Posted June 5, 2011 onPlayerContact source is a player. why getVehicleOccupant(source)? i think when a player crashes into the car then it is hitted...???? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Moderators Citizen Posted June 5, 2011 Moderators Posted June 5, 2011 No because the this is only for player ( that's why it's in the Player events category and it's name is onPlayerContact ) The rEvolution is coming ...
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