Jump to content

WEAPONS SELL PANNEL [RP]


lockdw

Recommended Posts

Sup! I have this function in my server. But i want that only players who is in "gang" ACL could use it. How can i do this?

Like, if you're not in the "gang" ACL, you can't even start the function. The pannel will not appears to you. 

function IniciarVendaArmas (source, Arma_Selecionada, getID, getPreco, getMunicao, WeaponID)
local Jogador = getPlayerID(getID)
local Preco = tonumber(getPreco)
local Municao = tonumber(getMunicao)
local MunicaoAtual = getElementData(source, "TS:MuniAtual") or 0

IniciarVendaArmas = StartWeaponSelling

Jogador = player

Preco = price

Municao = ammo

MunicaoAtual = current ammo

Edited by lockdw
Link to comment
2 hours ago, lockdw said:

Sup! I have this function in my server. But i want that only players who is in "gang" ACL could use it. How can i do this?

Like, if you're not in the "gang" ACL, you can't even start the function. The pannel will not appears to you. 


function IniciarVendaArmas (source, Arma_Selecionada, getID, getPreco, getMunicao, WeaponID)
local Jogador = getPlayerID(getID)
local Preco = tonumber(getPreco)
local Municao = tonumber(getMunicao)
local MunicaoAtual = getElementData(source, "TS:MuniAtual") or 0

IniciarVendaArmas = StartWeaponSelling

Jogador = player

Preco = price

Municao = ammo

MunicaoAtual = current ammo

local account = getPlayerAccount ( player )
if account and not isGuestAccount ( player ) then
	if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup('Acl name here')) then
		-- your code here
	end
end
    

 

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