Jump to content

Skin Proibida


Recommended Posts

Eu queria criar um script, que proibisse que jogadores comuns colocassem skins de admin, e se a pessoa que colocou a skin ID: 217, não for admin, seria morta, e eu cheguei no código abaixo:

function skin(playerSource) 
if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
if (getElementModel(playerSource) == 217) then 
killPed(source) 
end 
end 
end 

Deve estar todo errado esse código :lol: , espero que vocês me ajudem a faze-lo funcionar

Link to comment

Tenta isso

function skin ( ) 
    if ( getElementType ( source ) == "player" ) then 
        if ( not isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ) ) ) then  
            if ( getElementModel ( source ) == 217 ) then 
                killPed ( source ) 
            end 
        end 
    end 
end 
addEventHandler ( "onElementModelChange", root, skin ) 

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...