Jump to content

ACL Exclusiva


Recommended Posts

2 hours ago, DNL291 said:

Depende, se for a ACL do painel admin vai precisar modificar e adicionar uma verificação por acl.

Se você quer dar permissão do VIP apenas para tal ACL vai precisar editar o script do vip. Mostre aqui o código se tiver dificuldades @HG Snuuk

Sim a forma que for mais facil pra mim entender mais ou menos , oque eu quero é que apenas um grupo da acl possa ativar o vip .


Veiculo_VIPs = {}

Grupo_01 = "Ouro"
VIP_Ouro_ID_Veiculo_01 = 411
VIP_Ouro_Pack_de_Armas_01 = { 1, 22, 22, 25 }
VIP_Ouro_Personagem_01 = 98

Grupo_02 = "Platina"
VIP_Platina_ID_Veiculo_01 = 411
VIP_Platina_ID_Veiculo_02 = 522
VIP_Platina_Pack_de_Armas_01 = { 29, 32, 1, 22 }
VIP_Platina_Personagem_01 = 98
VIP_Platina_Personagem_02 = 211
VIP_Platina_Vida = 100

Grupo_03 = "Diamante"
VIP_Diamante_ID_Veiculo_01 = 411
VIP_Diamante_ID_Veiculo_02 = 522
VIP_Diamante_Pack_de_Armas_01 = { 30, 24, 4, 34 }
VIP_Diamante_Pack_de_Armas_02 = { 29, 32, 1, 22 }
VIP_Diamante_Personagem_01 = 98
VIP_Diamante_Personagem_02 = 200
VIP_Diamante_Personagem_03 = 211
VIP_Diamante_Vida = 100
VIP_Diamante_Colete = 70

Grupo_04 = "Rubi"
VIP_Rubi_ID_Veiculo_01 = 411
VIP_Rubi_ID_Veiculo_02 = 522
VIP_Rubi_Pack_de_Armas_01 = { 31, 24, 4, 34, 26, 34 }
VIP_Rubi_Pack_de_Armas_02 = { 29, 27, 1, 22, 30, 46 }
VIP_Rubi_Personagem_01 = 98
VIP_Rubi_Personagem_02 = 200
VIP_Rubi_Personagem_03 = 211
VIP_Rubi_Vida = 100
VIP_Rubi_Colete = 100

function Receber_Client_AirNewSCR ( Tipo, VIP, ID )
    if Tipo == "Veiculo(s)" then
		local Jogador_X, Jogador_Y, Jogador_Z = getElementPosition ( source )
	    local Rotacao_X, Rotacao_Y, Rotacao_Z = getElementRotation ( source )
		if isElement ( Veiculo_VIPs[source] ) then
		    destroyElement ( Veiculo_VIPs[source] )
		end
		if VIP == "Ouro" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Ouro_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Platina" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Platina_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Platina" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Platina_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Diamante" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Diamante_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Diamante" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Diamante_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Rubi" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Rubi_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Rubi" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Rubi_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		end
		setElementRotation ( Veiculo_VIPs[source], Rotacao_X, Rotacao_Y, Rotacao_Z )
		warpPedIntoVehicle ( source, Veiculo_VIPs[source] )
		exports.Scripts_Dxmessages:outputDx ( source, "Veiculo VIP "..VIP.." Criado com Sucesso!", "success" )
	elseif Tipo == "Arma(s)" then
		if VIP == "Ouro" and ID == 1 then
		    if getElementData ( source, "Ouro_Arma(s)" ) == "Bloqueado" then
			    exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [1 Minuto]", "warning" )
			else
		        setElementData ( source, "Ouro_Arma(s)", "Bloqueado" ) -- 1 Minuto
		        for _, Armas in ipairs ( VIP_Ouro_Pack_de_Armas_01 ) do
			        giveWeapon ( source, Armas, 999 )
			    end
				exports.Scripts_Dxmessages:outputDx ( source, "Você Recebeu o Pack de Arma(s) do VIP "..VIP.." com Sucesso!", "success" )
				setTimer ( setElementData, 60000, 1, source, "Ouro_Arma(s)", "Desbloqueado" )
			end
		elseif VIP == "Platina" and ID == 1 then
		    if getElementData ( source, "Platina_Arma(s)" ) == "Bloqueado" then
                exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [10 Segundo(s)]", "warning" )
			else
		        setElementData ( source, "Platina_Arma(s)", "Bloqueado" ) -- 10 Segundos
		        for _, Armas in ipairs ( VIP_Platina_Pack_de_Armas_01 ) do
			        giveWeapon ( source, Armas, 999 )
			    end
				exports.Scripts_Dxmessages:outputDx ( source, "Você Recebeu o Pack de Arma(s) do VIP "..VIP.." com Sucesso!", "success" )
				setTimer ( setElementData, 10000, 1, source, "Platina_Arma(s)", "Desbloqueado" )
			end
		elseif VIP == "Diamante" and ID == 1 then
		    for _, Armas in ipairs ( VIP_Diamante_Pack_de_Armas_01 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Diamante" and ID == 2 then
		    for _, Armas in ipairs ( VIP_Diamante_Pack_de_Armas_02 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Rubi" and ID == 1 then
		    for _, Armas in ipairs ( VIP_Rubi_Pack_de_Armas_01 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Rubi" and ID == 2 then
		    for _, Armas in ipairs ( VIP_Rubi_Pack_de_Armas_02 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		end
		if getElementData ( source, "Ouro_Arma(s)" ) == "Bloqueado" or getElementData ( source, "Platina_Arma(s)" ) == "Bloqueado" then return end
		exports.Scripts_Dxmessages:outputDx ( source, "Você Recebeu o Pack de Arma(s) do VIP "..VIP.." com Sucesso!", "success" )
	elseif Tipo == "Skin(s)" then
		if VIP == "Ouro" and ID == 1 then
		    setElementModel ( source, VIP_Ouro_Personagem_01 )
		elseif VIP == "Platina" and ID == 1 then
		    setElementModel ( source, VIP_Platina_Personagem_01 )
		elseif VIP == "Platina" and ID == 2 then
		    setElementModel ( source, VIP_Platina_Personagem_02 )
		elseif VIP == "Diamante" and ID == 1 then
		    setElementModel ( source, VIP_Diamante_Personagem_01 )
		elseif VIP == "Diamante" and ID == 2 then
		    setElementModel ( source, VIP_Diamante_Personagem_02 )
		elseif VIP == "Diamante" and ID == 3 then
		    setElementModel ( source, VIP_Diamante_Personagem_03 )
		elseif VIP == "Rubi" and ID == 1 then
		    setElementModel ( source, VIP_Rubi_Personagem_01 )
		elseif VIP == "Rubi" and ID == 2 then
		    setElementModel ( source, VIP_Rubi_Personagem_02 )
		elseif VIP == "Rubi" and ID == 3 then
		    setElementModel ( source, VIP_Rubi_Personagem_03 )
		end
		exports.Scripts_Dxmessages:outputDx ( source, "Personagem VIP "..VIP.." ID "..ID.." Setado com Sucesso!", "success" )
	elseif Tipo == "Vida" then
		if VIP == "Platina" and ID == 1 then
		    if getElementData ( source, "Platina_Vida" ) == "Bloqueado" then
		        exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [2 Minuto(s)]", "warning" )
			else
				if getElementHealth ( source ) < VIP_Platina_Vida then
					setElementData ( source, "Platina_Vida", "Bloqueado" ) -- 2 Minuto(s)
					setElementHealth ( source, VIP_Platina_Vida )
					exports.Scripts_Dxmessages:outputDx ( source, "Sua Vida foi Alterada para "..VIP_Platina_Vida.."% com Sucesso!", "success" )
					setTimer ( setElementData, 120000, 1, source, "Platina_Vida", "Desbloqueado" )
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com mais de "..VIP_Platina_Vida.."% de Vida!", "error" )
				end
			end		
		elseif VIP == "Diamante" and ID == 1 then
		    if getElementData ( source, "Diamante_Vida" ) == "Bloqueado" then
			    exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [2 Minuto(s)]", "warning" )
			else
			    if getElementHealth ( source ) < VIP_Diamante_Vida then
		            setElementData ( source, "Diamante_Vida", "Bloqueado" ) -- 2 Minuto(s)
			        setElementHealth ( source, VIP_Diamante_Vida )
					exports.Scripts_Dxmessages:outputDx ( source, "Sua Vida foi Alterada para "..VIP_Diamante_Vida.."% com Sucesso!", "success" )
					setTimer ( setElementData, 120000, 1, source, "Diamante_Vida", "Desbloqueado" )
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Diamante_Vida.."% de Vida!", "error" )
				end
			end
	    elseif VIP == "Rubi" and ID == 1 then
			if getElementHealth ( source ) < VIP_Rubi_Vida then
			    setElementHealth ( source, VIP_Rubi_Vida )
				exports.Scripts_Dxmessages:outputDx ( source, "Sua Vida foi Alterada para "..VIP_Rubi_Vida.."% com Sucesso!", "success" )
			else
				exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Rubi_Vida.."% de Vida!", "error" )
			end
		end
	elseif Tipo == "Colete" then
	    if VIP == "Diamante" and ID == 1 then
		    if getPedArmor ( source ) < VIP_Diamante_Colete then
		        setPedArmor ( source, VIP_Diamante_Colete )
				exports.Scripts_Dxmessages:outputDx ( source, "Seu Colete foi Alterado para "..VIP_Diamante_Colete.."% com Sucesso!", "success" )
			else
			    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com mais de "..VIP_Diamante_Colete.."% de Colete!", "error" )
			end
	    elseif VIP == "Rubi" and ID == 1 then
            if getPedArmor ( source ) < VIP_Rubi_Colete then
		        setPedArmor ( source, VIP_Rubi_Colete )
				exports.Scripts_Dxmessages:outputDx ( source, "Seu Colete foi Alterado para "..VIP_Rubi_Colete.."% com Sucesso!", "success" )
			else
			    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Rubi_Colete.."% de Colete!", "error" )
			end
	    end
	elseif Tipo == "Blindagem" then
	    if VIP == "Rubi" and ID == 1 then
	        if isPedInVehicle ( source ) then
		        if isVehicleDamageProof ( getPedOccupiedVehicle ( source ) ) == false then
		    	    setVehicleDamageProof ( getPedOccupiedVehicle ( source ), true )
		    	    exports.Scripts_Dxmessages:outputDx ( source, "Você Aplicou Blindagem no Seu Veiculo Atual com Sucesso!", "success")
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "O Veiculo que você está atualmente já está Blindado!", "error")
		        end
	        else
	            exports.Scripts_Dxmessages:outputDx ( source, "Entre em um Veiculo para utilizar esta função!", "error")
	        end
	    end
	elseif Tipo == "Mensagem" then
	    if VIP == "Diamante" or VIP == "Rubi" then
		    if ID then
			    exports.Scripts_Dxmessages:outputDx ( source, ID, "info")
			end
		end		
	end
end
addEvent ( "AirNewSCR_EnviarServidor", true )
addEventHandler ( "AirNewSCR_EnviarServidor", getRootElement ( ), Receber_Client_AirNewSCR )
		
function Sair_do_Servidor_AirNewSCR ( quitType )
	if isElement ( Veiculo_VIPs[source] ) then
	    destroyElement ( Veiculo_VIPs[source] )
	end
end
addEventHandler ( "onPlayerQuit", getRootElement ( ), Sair_do_Servidor_AirNewSCR )

function Morrer_no_Servidor_AirNewSCR ( )
	if isElement ( Veiculo_VIPs[source] ) then
	    destroyElement ( Veiculo_VIPs[source] )
	end
end
addEventHandler( "onPlayerWasted", getRootElement( ), Morrer_no_Servidor_AirNewSCR )
		
function Verificar_VIP_AirNewSCR ( )
	for i, player in ipairs ( getElementsByType ( "player" ) ) do
		local acc = getPlayerAccount ( player )
		if acc and not isGuestAccount ( acc ) then
			local accName = getAccountName (acc)
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_01 ) ) then
			    setElementData ( player, "VIP_01", "Sim" )
			else
			    setElementData ( player, "VIP_01", "Não" )
			end
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_02 ) ) then
			    setElementData ( player, "VIP_02", "Sim" )
			else
			    setElementData ( player, "VIP_02", "Não" )
			end
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_03 ) ) then
			    setElementData ( player, "VIP_03", "Sim" )
			else
			    setElementData ( player, "VIP_03", "Não" )
			end
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_04 ) ) then
			    setElementData ( player, "VIP_04", "Sim" )
			else
			    setElementData ( player, "VIP_04", "Não" )
			end
		end
	end
end
setTimer ( Verificar_VIP_AirNewSCR, 1500, 0 )

 

Link to comment
15 hours ago, HG Snuuk said:

Sim a forma que for mais facil pra mim entender mais ou menos , oque eu quero é que apenas um grupo da acl possa ativar o vip .


Veiculo_VIPs = {}

Grupo_01 = "Ouro"
VIP_Ouro_ID_Veiculo_01 = 411
VIP_Ouro_Pack_de_Armas_01 = { 1, 22, 22, 25 }
VIP_Ouro_Personagem_01 = 98

Grupo_02 = "Platina"
VIP_Platina_ID_Veiculo_01 = 411
VIP_Platina_ID_Veiculo_02 = 522
VIP_Platina_Pack_de_Armas_01 = { 29, 32, 1, 22 }
VIP_Platina_Personagem_01 = 98
VIP_Platina_Personagem_02 = 211
VIP_Platina_Vida = 100

Grupo_03 = "Diamante"
VIP_Diamante_ID_Veiculo_01 = 411
VIP_Diamante_ID_Veiculo_02 = 522
VIP_Diamante_Pack_de_Armas_01 = { 30, 24, 4, 34 }
VIP_Diamante_Pack_de_Armas_02 = { 29, 32, 1, 22 }
VIP_Diamante_Personagem_01 = 98
VIP_Diamante_Personagem_02 = 200
VIP_Diamante_Personagem_03 = 211
VIP_Diamante_Vida = 100
VIP_Diamante_Colete = 70

Grupo_04 = "Rubi"
VIP_Rubi_ID_Veiculo_01 = 411
VIP_Rubi_ID_Veiculo_02 = 522
VIP_Rubi_Pack_de_Armas_01 = { 31, 24, 4, 34, 26, 34 }
VIP_Rubi_Pack_de_Armas_02 = { 29, 27, 1, 22, 30, 46 }
VIP_Rubi_Personagem_01 = 98
VIP_Rubi_Personagem_02 = 200
VIP_Rubi_Personagem_03 = 211
VIP_Rubi_Vida = 100
VIP_Rubi_Colete = 100

function Receber_Client_AirNewSCR ( Tipo, VIP, ID )
    if Tipo == "Veiculo(s)" then
		local Jogador_X, Jogador_Y, Jogador_Z = getElementPosition ( source )
	    local Rotacao_X, Rotacao_Y, Rotacao_Z = getElementRotation ( source )
		if isElement ( Veiculo_VIPs[source] ) then
		    destroyElement ( Veiculo_VIPs[source] )
		end
		if VIP == "Ouro" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Ouro_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Platina" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Platina_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Platina" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Platina_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Diamante" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Diamante_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Diamante" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Diamante_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Rubi" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Rubi_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Rubi" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Rubi_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		end
		setElementRotation ( Veiculo_VIPs[source], Rotacao_X, Rotacao_Y, Rotacao_Z )
		warpPedIntoVehicle ( source, Veiculo_VIPs[source] )
		exports.Scripts_Dxmessages:outputDx ( source, "Veiculo VIP "..VIP.." Criado com Sucesso!", "success" )
	elseif Tipo == "Arma(s)" then
		if VIP == "Ouro" and ID == 1 then
		    if getElementData ( source, "Ouro_Arma(s)" ) == "Bloqueado" then
			    exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [1 Minuto]", "warning" )
			else
		        setElementData ( source, "Ouro_Arma(s)", "Bloqueado" ) -- 1 Minuto
		        for _, Armas in ipairs ( VIP_Ouro_Pack_de_Armas_01 ) do
			        giveWeapon ( source, Armas, 999 )
			    end
				exports.Scripts_Dxmessages:outputDx ( source, "Você Recebeu o Pack de Arma(s) do VIP "..VIP.." com Sucesso!", "success" )
				setTimer ( setElementData, 60000, 1, source, "Ouro_Arma(s)", "Desbloqueado" )
			end
		elseif VIP == "Platina" and ID == 1 then
		    if getElementData ( source, "Platina_Arma(s)" ) == "Bloqueado" then
                exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [10 Segundo(s)]", "warning" )
			else
		        setElementData ( source, "Platina_Arma(s)", "Bloqueado" ) -- 10 Segundos
		        for _, Armas in ipairs ( VIP_Platina_Pack_de_Armas_01 ) do
			        giveWeapon ( source, Armas, 999 )
			    end
				exports.Scripts_Dxmessages:outputDx ( source, "Você Recebeu o Pack de Arma(s) do VIP "..VIP.." com Sucesso!", "success" )
				setTimer ( setElementData, 10000, 1, source, "Platina_Arma(s)", "Desbloqueado" )
			end
		elseif VIP == "Diamante" and ID == 1 then
		    for _, Armas in ipairs ( VIP_Diamante_Pack_de_Armas_01 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Diamante" and ID == 2 then
		    for _, Armas in ipairs ( VIP_Diamante_Pack_de_Armas_02 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Rubi" and ID == 1 then
		    for _, Armas in ipairs ( VIP_Rubi_Pack_de_Armas_01 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Rubi" and ID == 2 then
		    for _, Armas in ipairs ( VIP_Rubi_Pack_de_Armas_02 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		end
		if getElementData ( source, "Ouro_Arma(s)" ) == "Bloqueado" or getElementData ( source, "Platina_Arma(s)" ) == "Bloqueado" then return end
		exports.Scripts_Dxmessages:outputDx ( source, "Você Recebeu o Pack de Arma(s) do VIP "..VIP.." com Sucesso!", "success" )
	elseif Tipo == "Skin(s)" then
		if VIP == "Ouro" and ID == 1 then
		    setElementModel ( source, VIP_Ouro_Personagem_01 )
		elseif VIP == "Platina" and ID == 1 then
		    setElementModel ( source, VIP_Platina_Personagem_01 )
		elseif VIP == "Platina" and ID == 2 then
		    setElementModel ( source, VIP_Platina_Personagem_02 )
		elseif VIP == "Diamante" and ID == 1 then
		    setElementModel ( source, VIP_Diamante_Personagem_01 )
		elseif VIP == "Diamante" and ID == 2 then
		    setElementModel ( source, VIP_Diamante_Personagem_02 )
		elseif VIP == "Diamante" and ID == 3 then
		    setElementModel ( source, VIP_Diamante_Personagem_03 )
		elseif VIP == "Rubi" and ID == 1 then
		    setElementModel ( source, VIP_Rubi_Personagem_01 )
		elseif VIP == "Rubi" and ID == 2 then
		    setElementModel ( source, VIP_Rubi_Personagem_02 )
		elseif VIP == "Rubi" and ID == 3 then
		    setElementModel ( source, VIP_Rubi_Personagem_03 )
		end
		exports.Scripts_Dxmessages:outputDx ( source, "Personagem VIP "..VIP.." ID "..ID.." Setado com Sucesso!", "success" )
	elseif Tipo == "Vida" then
		if VIP == "Platina" and ID == 1 then
		    if getElementData ( source, "Platina_Vida" ) == "Bloqueado" then
		        exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [2 Minuto(s)]", "warning" )
			else
				if getElementHealth ( source ) < VIP_Platina_Vida then
					setElementData ( source, "Platina_Vida", "Bloqueado" ) -- 2 Minuto(s)
					setElementHealth ( source, VIP_Platina_Vida )
					exports.Scripts_Dxmessages:outputDx ( source, "Sua Vida foi Alterada para "..VIP_Platina_Vida.."% com Sucesso!", "success" )
					setTimer ( setElementData, 120000, 1, source, "Platina_Vida", "Desbloqueado" )
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com mais de "..VIP_Platina_Vida.."% de Vida!", "error" )
				end
			end		
		elseif VIP == "Diamante" and ID == 1 then
		    if getElementData ( source, "Diamante_Vida" ) == "Bloqueado" then
			    exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [2 Minuto(s)]", "warning" )
			else
			    if getElementHealth ( source ) < VIP_Diamante_Vida then
		            setElementData ( source, "Diamante_Vida", "Bloqueado" ) -- 2 Minuto(s)
			        setElementHealth ( source, VIP_Diamante_Vida )
					exports.Scripts_Dxmessages:outputDx ( source, "Sua Vida foi Alterada para "..VIP_Diamante_Vida.."% com Sucesso!", "success" )
					setTimer ( setElementData, 120000, 1, source, "Diamante_Vida", "Desbloqueado" )
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Diamante_Vida.."% de Vida!", "error" )
				end
			end
	    elseif VIP == "Rubi" and ID == 1 then
			if getElementHealth ( source ) < VIP_Rubi_Vida then
			    setElementHealth ( source, VIP_Rubi_Vida )
				exports.Scripts_Dxmessages:outputDx ( source, "Sua Vida foi Alterada para "..VIP_Rubi_Vida.."% com Sucesso!", "success" )
			else
				exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Rubi_Vida.."% de Vida!", "error" )
			end
		end
	elseif Tipo == "Colete" then
	    if VIP == "Diamante" and ID == 1 then
		    if getPedArmor ( source ) < VIP_Diamante_Colete then
		        setPedArmor ( source, VIP_Diamante_Colete )
				exports.Scripts_Dxmessages:outputDx ( source, "Seu Colete foi Alterado para "..VIP_Diamante_Colete.."% com Sucesso!", "success" )
			else
			    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com mais de "..VIP_Diamante_Colete.."% de Colete!", "error" )
			end
	    elseif VIP == "Rubi" and ID == 1 then
            if getPedArmor ( source ) < VIP_Rubi_Colete then
		        setPedArmor ( source, VIP_Rubi_Colete )
				exports.Scripts_Dxmessages:outputDx ( source, "Seu Colete foi Alterado para "..VIP_Rubi_Colete.."% com Sucesso!", "success" )
			else
			    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Rubi_Colete.."% de Colete!", "error" )
			end
	    end
	elseif Tipo == "Blindagem" then
	    if VIP == "Rubi" and ID == 1 then
	        if isPedInVehicle ( source ) then
		        if isVehicleDamageProof ( getPedOccupiedVehicle ( source ) ) == false then
		    	    setVehicleDamageProof ( getPedOccupiedVehicle ( source ), true )
		    	    exports.Scripts_Dxmessages:outputDx ( source, "Você Aplicou Blindagem no Seu Veiculo Atual com Sucesso!", "success")
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "O Veiculo que você está atualmente já está Blindado!", "error")
		        end
	        else
	            exports.Scripts_Dxmessages:outputDx ( source, "Entre em um Veiculo para utilizar esta função!", "error")
	        end
	    end
	elseif Tipo == "Mensagem" then
	    if VIP == "Diamante" or VIP == "Rubi" then
		    if ID then
			    exports.Scripts_Dxmessages:outputDx ( source, ID, "info")
			end
		end		
	end
end
addEvent ( "AirNewSCR_EnviarServidor", true )
addEventHandler ( "AirNewSCR_EnviarServidor", getRootElement ( ), Receber_Client_AirNewSCR )
		
function Sair_do_Servidor_AirNewSCR ( quitType )
	if isElement ( Veiculo_VIPs[source] ) then
	    destroyElement ( Veiculo_VIPs[source] )
	end
end
addEventHandler ( "onPlayerQuit", getRootElement ( ), Sair_do_Servidor_AirNewSCR )

function Morrer_no_Servidor_AirNewSCR ( )
	if isElement ( Veiculo_VIPs[source] ) then
	    destroyElement ( Veiculo_VIPs[source] )
	end
end
addEventHandler( "onPlayerWasted", getRootElement( ), Morrer_no_Servidor_AirNewSCR )
		
function Verificar_VIP_AirNewSCR ( )
	for i, player in ipairs ( getElementsByType ( "player" ) ) do
		local acc = getPlayerAccount ( player )
		if acc and not isGuestAccount ( acc ) then
			local accName = getAccountName (acc)
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_01 ) ) then
			    setElementData ( player, "VIP_01", "Sim" )
			else
			    setElementData ( player, "VIP_01", "Não" )
			end
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_02 ) ) then
			    setElementData ( player, "VIP_02", "Sim" )
			else
			    setElementData ( player, "VIP_02", "Não" )
			end
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_03 ) ) then
			    setElementData ( player, "VIP_03", "Sim" )
			else
			    setElementData ( player, "VIP_03", "Não" )
			end
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo_04 ) ) then
			    setElementData ( player, "VIP_04", "Sim" )
			else
			    setElementData ( player, "VIP_04", "Não" )
			end
		end
	end
end
setTimer ( Verificar_VIP_AirNewSCR, 1500, 0 )

 

Renomeie onde diz "Grupo_X" , coloque a acl que você quer. Repita os procedimentos para todos os grupos.

 

Link to comment
4 hours ago, MesaDowN said:

Onde diz Grupo_01 sim, e os respetivos..

 

certo , porem pelo que eu entendi é que qualquer admin com painel p conseguiria ativar o vip pela acl e eu no caso queria deixar apenas para o grupo "console" para poder ativar isso seria possivel via script ou teria que mexer no painel "p" ?

Link to comment

Na verdade não, apenas os admins com acesso a aba (resources) conseguem setar novos cargos manualmente pelo painel (p), por tanto, você pode modificar isso na acl, por padrão os grupos que tem acesso a aba resources são: SuperModerator ++, ou seja, apenas 2 grupos possuem acesso a ela, caso queria remover é bem simples, abra seu acl.xml e procure por:

<right name="general.tab_resources" access="true"></right>

Onde tiver true troque por false, desta forma:

<right name="general.tab_resources" access="false"></right>

Salve e de reload na acl, /reloadacl e de restart no painel admin, mas eu aconselho desligar o servidor pra fazer esse tipo de mudança pra evitar qualquer tipo de bug alienígena....

Edited by Jonas^
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...