Jump to content

zuzu

Members
  • Posts

    7
  • Joined

  • Last visited

zuzu's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Ok I manage how make it work, thanks for help everyone. One more little question, how can I output short distance value like "was killed from 200m" except of "was killed from 200.23472423108m" ?
  2. @ MrTasty Not that newbie:p @ Cheez3D Thanks for your exmaple! Anyway its still wont work but I found where the problem is. My server is running DayZ gamemode, and when I terminate it then distance appeared and your script as same as mine works perfect. So my next problem is how to adapt it for DayZ... I wonder why all killmessages and other stuff works there, while distance dont.
  3. I heve used this code for meta and my script called kd_s.lua <meta> <info author="kev" type="script" name="KillDistance" version="1.0"/> <script src="kd_s.lua" type="server" /> </meta> So everything should be fine I think.
  4. So this should work, right? Yes I'm total newb, but I know that onPlayerWasted is server side, and ofc how I should create meta's
  5. There are many kill/dead message scripts, but i couldnt find any that will output distance which from player was killed. Ive seen it on few servers, so i decided to make my own but somehow it doesent work.. Could someone take a look on it, and help me please addEventHandler ( "onPlayerWasted" , root, function ( _, killer ) x,y,z = getElementPosition ( source ) x1,y1,z1 = getElementPosition ( killer ) distance = getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 ) outputChatBox ( getPlayerName(source).." was killed by "..getPlayerName ( killer ), root, 255, 255, 255 ) outputChatBox ( "Distance: "..distance, root, 255, 255, 255 ) end)
×
×
  • Create New...