Sign in to follow this  
ikariamman

Szukam Skryptu

Recommended Posts

Witam poszukuje 2 skryptów do modu DayZ.

1. killmsg- pokazuje z kogo jakiej odległosci, broni kto go zabil i ile GP dostal -cos takiego

2. god- jest to god dla admina po wpisaniu komendy

Share this post


Link to post

Number 2 :

meta.xml :

  
<meta> 
    <info author="Maciej 'MACIEKW89' Wituszyński" type="script" version="1.0"/> 
         <script src="c.lua" type="client"/> 
         <script src="s.lua" type="server"/> 
</meta> 
  

c.lua :

  
addEventHandler("onClientPlayerDamage",root, 
function() 
    if getElementData(source,"godmode") then 
        cancelEvent() 
    end 
end) 
  
addEventHandler("onClientPlayerStealthKill",localPlayer, 
function (targetPlayer) 
    if getElementData(targetPlayer,"godmode") then 
        cancelEvent() 
    end 
end) 

s.lua :

  
addCommandHandler("godmode", 
function(thePlayer) 
    local account = getPlayerAccount (thePlayer) 
    if (not account or isGuestAccount(account)) then 
        return 
    end 
  
    local accountName = getAccountName(account) 
    if (isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then 
        local state = (not getElementData(thePlayer, "godmode")) 
        setElementData(thePlayer, "godmode", state) 
    end 
end) 
  

Co do pierwszego to troszkę więcej pisania, a ja niestety leniwy jestem ;b. Nie testowane, robione na szybko. Mam nadzieję, że pomogłem.

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.