Sign in to follow this  
MRmihailZH

Не работает скрипт

Recommended Posts

Не работает скрипт, он делает только одну функцию где fraction равен 1

function makeleader ( source, commandName, accName, fraction )
    local accountName = getAccountName ( getPlayerAccount ( source ) )
	  if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then  
	  if accName then
	  if  fraction ~= 1 then
		aclGroupAddObject (aclGetGroup("leaderLSPD"), "user."..accName)
		aclGroupAddObject (aclGetGroup("leaders"), "user."..accName)
		aclGroupAddObject (aclGetGroup("LSPD"), "user."..accName)
	    elseif fraction ~= 2 then
	    aclGroupAddObject (aclGetGroup("leaderLVPD"), "user."..accName)
		aclGroupAddObject (aclGetGroup("leaders"), "user."..accName)
		aclGroupAddObject (aclGetGroup("LVPD"), "user."..accName)
	    elseif fraction ~= 3 then
	    aclGroupAddObject (aclGetGroup("leaderSFPD"), "user."..accName)
		aclGroupAddObject (aclGetGroup("leaders"), "user."..accName)
		aclGroupAddObject (aclGetGroup("SFPD"), "user."..accName)
	    elseif fraction ~= 0 then
		aclGroupRemoveObject (aclGetGroup("leaderLVPD"), "user."..accName)
		aclGroupRemoveObject (aclGetGroup("leaderSFPD"), "user."..accName)
		aclGroupRemoveObject (aclGetGroup("leaderLSPD"), "user."..accName)
		aclGroupRemoveObject (aclGetGroup("leaders"), "user."..accName)
		aclGroupRemoveObject (aclGetGroup("LVPD"), "user."..accName)
		aclGroupRemoveObject (aclGetGroup("SFPD"), "user."..accName)
		aclGroupRemoveObject (aclGetGroup("LSPD"), "user."..accName)
end
end
end
end
addCommandHandler("makeleader", makeleader)

 

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.