Jump to content

[HELP] Script


1LoL1

Recommended Posts

Please anyone can help me with this script? not work :(

Admins can kill players = not work

Admins cant kill admins = work

Players cant kill players = work

Players cant kill admins = not work

And i want this:

Admins can kill players = work

Admins cant kill admins = work

Players cant kill players = work

Players cant kill admins = work

Please help :(

Client:

addEventHandler("onClientPlayerDamage",root,function(a) 
   if a then 
    if getElementData(source,"k:ranga")=="admin" and getElementData(a,"k:ranga")=="cywil" then 
    else 
    cancelEvent () return 
   end 
end) 

Server:

addEventHandler("onPlayerLogin",root,function(_,konto) 
  if konto then 
   if isObjectInACLGroup("user."..getAccountName(konto),aclGetGroup("Admin")) then 
    setElementData(source,"k:ranga","admin") 
   else 
    setElementData(source,"k:ranga","cywil") 
  end 
end) 

Link to comment
  • Other Languages Moderators
addEventHandler("onClientPlayerDamage", localPlayer, 
function(a) 
    if a and getElementType(a) == "player" then 
        if getElementData(source, "k:ranga") == "admin" then 
            cancelEvent() 
        end 
    end 
end) 

addEventHandler("onPlayerLogin", root,  
function(_,konto) 
    if konto then 
        if isObjectInACLGroup("user."..getAccountName(konto) ,aclGetGroup("Admin")) then 
            setElementData(source, "k:ranga", "admin") 
        else 
            setElementData(source, "k:ranga", "cywil") 
        end 
    end 
end) 

Link to comment
addEventHandler("onClientPlayerDamage", localPlayer, 
function(a) 
    if a and getElementType(a) == "player" then 
        if getElementData(source, "k:ranga") == "admin" then 
            cancelEvent() 
        end 
    end 
end) 

addEventHandler("onPlayerLogin", root,  
function(_,konto) 
    if konto then 
        if isObjectInACLGroup("user."..getAccountName(konto) ,aclGetGroup("Admin")) then 
            setElementData(source, "k:ranga", "admin") 
        else 
            setElementData(source, "k:ranga", "cywil") 
        end 
    end 
end) 

player cant kill player not work :/ and i can kill admins / players with car. :(

Link to comment
  • Other Languages Moderators
addEventHandler("onClientPlayerDamage", localPlayer, 
function(a) 
    if a and getElementType(a) == "player" then 
        if getElementData(a, "k:ranga") == "admin" and getElementData(source, "k:ranga") == "cywil" then 
        else 
            cancelEvent() 
        end 
    end 
end) 

Link to comment
addEventHandler("onClientPlayerDamage", localPlayer, 
function(a) 
    if a and getElementType(a) == "player" then 
        if getElementData(a, "k:ranga") == "admin" and getElementData(source, "k:ranga") == "cywil" then 
        else 
            cancelEvent() 
        end 
    end 
end) 

Thanks. !!! work :D

Link to comment
  • Other Languages Moderators
addEventHandler("onClientPlayerDamage", localPlayer, 
function(a) 
    if a and getElementType(a) == "player" then 
        if getElementData(a, "k:ranga") == "admin" and getElementData(source, "k:ranga") == "cywil" then 
        else 
            cancelEvent() 
        end 
    elseif a and getElementType(a) == "vehicle" then 
        cancelEvent() 
    end 
end) 

Link to comment
addEventHandler("onClientPlayerDamage", localPlayer, 
function(a) 
    if a and getElementType(a) == "player" then 
        if getElementData(a, "k:ranga") == "admin" and getElementData(source, "k:ranga") == "cywil" then 
        else 
            cancelEvent() 
        end 
    elseif a and getElementType(a) == "vehicle" then 
        cancelEvent() 
    end 
end) 

Thanks. Work. :D

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...