Jump to content

Help with a code


Gomes

Recommended Posts

Heyo, I'm using (sneak) script, to run with weapons, but I wanna make it for just ACL members, like.. If player1 is in acl "VIP" he will run with weapons.


 

function changeWalkStyle(player)
local accname =  getAccountName ( getPlayerAccount(ThePlayer))
    if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then
        setPedWalkingStyle(player,69)
    end
end
addEventHandler(changeWalkStyle, player)
Link to comment
3 hours ago, #\_oskar_/# said:
function changeWalkStyle(ThePlayer, command)
if isObjectInACLGroup("user."..getAccountName ( getPlayerAccount(ThePlayer)), aclGetGroup("Admin")) then
setPedWalkingStyle(ThePlayer,69)
end 
end
addCommandHandler("WalkingStyle", changeWalkStyle)

 

thx bru, but how I can make it without use any command? just by acl?

Link to comment
function WalkingByAcl(ThePlayer,style,group)
if isObjectInACLGroup("user."..getAccountName ( getPlayerAccount(ThePlayer)), aclGetGroup(group or "Admin")) then
setPedWalkingStyle(ThePlayer,style or 0)
end end
------------------
addEventHandler("onPlayerLogin",root,function ()
WalkingByAcl(source,69,'Admin') 
end)

local function startedResource()
for key,ThePlayer in ipairs(getElementsByType("player")) do WalkingByAcl(ThePlayer,69,'Admin')  end
end
addEventHandler("onResourceStart",resourceRoot,startedResource)

 

Link to comment
6 minutes ago, #\_oskar_/# said:
function WalkingByAcl(ThePlayer,style,group)
if isObjectInACLGroup("user."..getAccountName ( getPlayerAccount(ThePlayer)), aclGetGroup(group or "Admin")) then
setPedWalkingStyle(ThePlayer,style or 0)
end end
------------------
addEventHandler("onPlayerLogin",root,function ()
WalkingByAcl(source,69,'Admin') 
end)

local function startedResource()
for key,ThePlayer in ipairs(getElementsByType("player")) do WalkingByAcl(ThePlayer,69,'Admin')  end
end
addEventHandler("onResourceStart",resourceRoot,startedResource)

 

ty ❤️

 

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