daffabahy Posted February 13, 2016 Share Posted February 13, 2016 triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FFFFFF"..getPlayerName(source).." #FFFFFFwas killed by "..(getPlayerName(killer) or "unknown")..".",0,22,255, "died") destroyElement(getElementData(source, "playerCol")) setTimer(spawnDayZPlayer, 5000, 1, source) end addEvent("kilLDayZPlayer", true) addEventHandler("kilLDayZPlayer", getRootElement(), kilLDayZPlayer) I have a mta dayz server, but i have small problem too. can you help fix this script ? [2016-02-13 06:14:38] WARNING: [DayZ-MTA]/DayZ/spawn.lua:672: Bad argument @ 'getPlayerName' [Expected element at argument 1, got boolean] Link to comment
SpecT Posted February 13, 2016 Share Posted February 13, 2016 Show the function that triggers "kilLDayZPlayer". Link to comment
daffabahy Posted February 13, 2016 Author Share Posted February 13, 2016 setTimer(checkBuggedAccount, 90000, 0) function notifyAboutExplosion2() for i, player in pairs(getVehicleOccupants(source)) do triggerEvent("kilLDayZPlayer", player) end end addEventHandler("onVehicleExplode", getRootElement(), notifyAboutExplosion2) function destroyDeadPlayer(ped, pedCol) destroyElement(ped) destroyElement(pedCol) end function kilLDayZPlayer(killer, headshot, weapon) This ? if not, i dont know where exactly. Link to comment
Tomas Posted February 13, 2016 Share Posted February 13, 2016 function notifyAboutExplosion2() for i, player in pairs(getVehicleOccupants(source)) do triggerEvent("kilLDayZPlayer", player, false, false, false) end end triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FFFFFF"..getPlayerName(source).." #FFFFFFwas killed by ".. ( isElement(killer) and getPlayerName(killer) or "unknown") ..".",0,22,255, "died") Link to comment
daffabahy Posted February 13, 2016 Author Share Posted February 13, 2016 Thanks, i'll try it soon. 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