Jump to content

[AJUDA] Script de vip com tempo determinado em ALGUNS vips


Recommended Posts

Bom dia!

Estou precisando que os vips: Bravo, Nobre e Monarca tenham 30 dias de duração e o Imperial seja permanente porém não entendo nada de Script. Alguém, por favor, consegue me dar uma luz?

SCRIPT DO CLIENTE:

local screenW,screenH = guiGetScreenSize()
local resW, resH = 1366,768
local x, y = (screenW/resW), (screenH/resH)

Painel_VIP_AirNewSCR = false

CorSel_R, CorSel_G, CorSel_B, CorSel_A = 51, 179, 93, 110

Abrir_Fechar_BindAirNewSCR = "J"

setElementData ( localPlayer, "AirNewSCR_VeiculoColorido", "Não" )
setElementData ( localPlayer, "AirNewSCR_FarolColorido", "Não" )

setElementData ( localPlayer, "Bravo_Arma(s)", "Desbloqueado" )
setElementData ( localPlayer, "Nobre_Arma(s)", "Desbloqueado" )

setElementData ( localPlayer, "Nobre_Vida", "Desbloqueado" )
setElementData ( localPlayer, "Monarca_Vida", "Desbloqueado" )

function PainelVIP_AirNewSCR ( )

    dxDrawRectangle(x*0, y*0, x*1366, y*768, tocolor(255, 255, 255, 11), false)

    dxDrawRectangle(x*0, y*168, x*1366, y*433, tocolor(0, 0, 0, 50), false)
    dxDrawRectangle(x*0, y*172, x*1366, y*425, tocolor(0, 0, 0, 50), false)
	
	dxDrawRectangle(x*111, y*191, x*221, y*388, tocolor(0, 0, 0, 51), false)
    dxDrawRectangle(x*412, y*191, x*221, y*388, tocolor(0, 0, 0, 51), false)
    dxDrawRectangle(x*734, y*191, x*221, y*388, tocolor(0, 0, 0, 51), false)
    dxDrawRectangle(x*1034, y*191, x*221, y*388, tocolor(0, 0, 0, 51), false)

	dxDrawRectangle(x*0, y*85, x*1366, y*73, tocolor(0, 0, 0, 50), false)
    dxDrawRectangle(x*0, y*89, x*1366, y*64, tocolor(0, 0, 0, 50), false)

    ------------------------------- VIP 01 -------------------------------

    if getElementData ( localPlayer, "VIP_01" ) ~= "Sim" then
	    dxDrawImage(x*153, y*263, x*135, y*173, "Arquivos/Cadeado.png" )
	    dxDrawText("Você não possui acesso ao VIP BRAVO!",   x*111, y*486, x*331, y*517, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
	else
	    if P ( x*121, y*249, x*201, y*22 ) then
		    dxDrawRectangle(x*121, y*249, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - Turismo
		else
	        dxDrawRectangle(x*121, y*249, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - Turismo
		end
	    if P ( x*121, y*275, x*201, y*22 ) then
		    dxDrawRectangle(x*121, y*275, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Pack de Armas (01)
		else
	        dxDrawRectangle(x*121, y*275, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Pack de Armas (01)
		end
		if P ( x*121, y*301, x*201, y*22 ) then
		    dxDrawRectangle(x*121, y*301, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (01)
		else
	        dxDrawRectangle(x*121, y*301, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (01)
		end
	end

    ------------------------------- VIP 02 -------------------------------

    if getElementData ( localPlayer, "VIP_02" ) ~= "Sim" then
	    dxDrawImage(x*456, y*263, x*135, y*173, "Arquivos/Cadeado.png" )
		dxDrawText("Você não possui acesso ao VIP NOBRE!", x*412, y*486, x*632, y*517, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
	else
	    if P ( x*422, y*249, x*201, y*22 ) then
		    dxDrawRectangle(x*422, y*249, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - Turismo
		else
	        dxDrawRectangle(x*422, y*249, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - Turismo
		end
	    if P ( x*422, y*275, x*201, y*22 ) then
	    dxDrawRectangle(x*422, y*275, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - NRG-500
		else
	        dxDrawRectangle(x*422, y*275, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - NRG-500
		end
	    if P ( x*422, y*301, x*201, y*22 ) then
		    dxDrawRectangle(x*422, y*301, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Vida 80%
		else
	        dxDrawRectangle(x*422, y*301, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Vida 80%
		end
	    if P ( x*422, y*327, x*201, y*22 ) then
		    dxDrawRectangle(x*422, y*327, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Pack de Armas (01)
		else
	        dxDrawRectangle(x*422, y*327, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Pack de Armas (01)
		end
	    if P ( x*422, y*353, x*201, y*22 ) then
		    dxDrawRectangle(x*422, y*353, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (01)
		else
	        dxDrawRectangle(x*422, y*353, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (01)
		end
	    if P ( x*422, y*379, x*201, y*22 ) then
		    dxDrawRectangle(x*422, y*379, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (02)
		else
	        dxDrawRectangle(x*422, y*379, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (02)
		end
	end
	
	------------------------------- VIP 03 -------------------------------
	
	if getElementData ( localPlayer, "VIP_03" ) ~= "Sim" then
	    dxDrawImage(x*778, y*263, x*135, y*173, "Arquivos/Cadeado.png" )
		dxDrawText("Você não possui acesso ao VIP MONARCA!",   x*734, y*486, x*954, y*517, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
	else
		if P ( x*744, y*249, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*249, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - Bullet
		else
	        dxDrawRectangle(x*744, y*249, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - Bullet
		end
	    if P ( x*744, y*275, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*275, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - NRG-500
		else
	        dxDrawRectangle(x*744, y*275, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - NRG-500
		end
	    if P ( x*744, y*301, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*301, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Vida 100%
		else
	        dxDrawRectangle(x*744, y*301, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Vida 100%
		end
	    if P ( x*744, y*327, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*327, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Colete 50%
		else
	        dxDrawRectangle(x*744, y*327, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Colete 50%
		end
		if P ( x*744, y*353, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*353, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Pack de Armas (01)
		else
	        dxDrawRectangle(x*744, y*353, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Pack de Armas (01)
		end
		if P ( x*744, y*379, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*379, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Pack de Armas (02)
		else
	        dxDrawRectangle(x*744, y*379, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Pack de Armas (02)
		end
		if P ( x*744, y*405, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*405, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (01)
		else
	        dxDrawRectangle(x*744, y*405, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (01)
		end
		if P ( x*744, y*431, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*431, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (02)
		else
	        dxDrawRectangle(x*744, y*431, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (02)
		end
		if P ( x*744, y*457, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*457, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (03)
		else
	        dxDrawRectangle(x*744, y*457, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (03)
		end
		if P ( x*744, y*483, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*483, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo Colorido
		else
	        dxDrawRectangle(x*744, y*483, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo Colorido
		end
		if P ( x*744, y*509, x*201, y*22 ) then
		    dxDrawRectangle(x*744, y*509, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Farol Colorido
		else
	        dxDrawRectangle(x*744, y*509, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Farol Colorido
		end
	end

    ------------------------------- VIP 04 -------------------------------
    
	if getElementData ( localPlayer, "VIP_04" ) ~= "Sim" then
	    dxDrawImage(x*1078, y*263, x*135, y*173, "Arquivos/Cadeado.png" )
        dxDrawText("Você não possui acesso ao VIP IMPERIAL!",   x*1034, y*486, x*1254, y*517, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    else
    	if P ( x*1044, y*249, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*249, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - Infernus
    	else
            dxDrawRectangle(x*1044, y*249, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - Infernus
    	end
        if P ( x*1044, y*275, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*275, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo - NRG-500
    	else
            dxDrawRectangle(x*1044, y*275, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo - NRG-500
    	end
        if P ( x*1044, y*301, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*301, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Vida 100%
    	else
            dxDrawRectangle(x*1044, y*301, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Vida 100%
    	end
        if P ( x*1044, y*327, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*327, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Colete 100%
    	else
            dxDrawRectangle(x*1044, y*327, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Colete 100%
    	end
        if P ( x*1044, y*353, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*353, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Pack de Armas (01)
    	else
            dxDrawRectangle(x*1044, y*353, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Pack de Armas (01)
    	end
        if P ( x*1044, y*379, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*379, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Pack de Armas (02)
    	else
            dxDrawRectangle(x*1044, y*379, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Pack de Armas (02)
    	end
        if P ( x*1044, y*405, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*405, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (01)
    	else
            dxDrawRectangle(x*1044, y*405, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (01)
    	end
        if P ( x*1044, y*431, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*431, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (02)
    	else
            dxDrawRectangle(x*1044, y*431, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (02)
    	end
        if P ( x*1044, y*457, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*457, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Personagem VIP (03)
    	else
            dxDrawRectangle(x*1044, y*457, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Personagem VIP (03)
    	end
        if P ( x*1044, y*483, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*483, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Veiculo Colorido
    	else
            dxDrawRectangle(x*1044, y*483, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Veiculo Colorido
    	end
        if P ( x*1044, y*509, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*509, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Farol Colorido
    	else
            dxDrawRectangle(x*1044, y*509, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Farol Colorido
    	end
        if P ( x*1044, y*535, x*201, y*22 ) then
    	    dxDrawRectangle(x*1044, y*535, x*201, y*22, tocolor(CorSel_R, CorSel_G, CorSel_B, CorSel_A), false) -- Blindagem para o Veiculo
    	else
            dxDrawRectangle(x*1044, y*535, x*201, y*22, tocolor(0, 0, 0, 110), false) -- Blindagem para o Veiculo
    	end
	end
    
	if getElementData ( localPlayer, "VIP_01" ) == "Sim" then
	    dxDrawText("Veiculo - Turismo",     x*121, y*249, x*322, y*271, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Pack de Armas (01)",    x*121, y*275, x*322, y*297, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Personagem VIP (01)",   x*121, y*301, x*322, y*323, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    end
	
	if getElementData ( localPlayer, "VIP_02" ) == "Sim" then
		dxDrawText("Veiculo - Turismo",     x*422, y*249, x*623, y*271, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Veiculo - NRG-500",     x*422, y*275, x*623, y*297, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Vida 80%",              x*422, y*301, x*623, y*323, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Pack de Armas (01)",    x*422, y*327, x*623, y*349, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (01)",   x*422, y*353, x*623, y*375, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (02)",   x*422, y*379, x*623, y*401, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    end
	
	if getElementData ( localPlayer, "VIP_03" ) == "Sim" then
		dxDrawText("Veiculo - Bullet",      x*744, y*249, x*945, y*271, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Veiculo - NRG-500",     x*744, y*275, x*945, y*297, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Vida 100%",             x*744, y*301, x*945, y*323, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Colete 50%",            x*744, y*327, x*945, y*349, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Pack de Armas (01)",    x*744, y*353, x*945, y*375, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Pack de Armas (02)",    x*744, y*379, x*945, y*401, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (01)",   x*744, y*405, x*945, y*427, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (02)",   x*744, y*431, x*945, y*453, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (03)",   x*744, y*457, x*945, y*479, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Veiculo Colorido",      x*744, y*483, x*945, y*505, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Farol Colorido",        x*744, y*509, x*945, y*531, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    end
	
	if getElementData ( localPlayer, "VIP_04" ) == "Sim" then
		dxDrawText("Veiculo - Infernus",       x*1044, y*249, x*1245, y*271, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Veiculo - NRG-500",        x*1044, y*275, x*1245, y*297, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Vida 100%",                x*1044, y*301, x*1245, y*323, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Colete 100%",              x*1044, y*327, x*1245, y*349, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Pack de Armas (01)",       x*1044, y*353, x*1245, y*375, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Pack de Armas (02)",       x*1044, y*379, x*1245, y*401, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (01)",      x*1044, y*405, x*1245, y*427, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (02)",      x*1044, y*431, x*1245, y*453, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Personagem VIP (03)",      x*1044, y*457, x*1245, y*479, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Veiculo Colorido",         x*1044, y*483, x*1245, y*505, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Farol Colorido",           x*1044, y*509, x*1245, y*531, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    	dxDrawText("Blindagem para o Veiculo", x*1044, y*535, x*1245, y*557, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
    end
	
	dxDrawText("Bravo",   x*111 + 1, y*191 + 1, x*332 + 1, y*249 + 1, tocolor(0, 0, 0, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    dxDrawText("Bravo",   x*111, y*191, x*332, y*249, tocolor(255, 255, 255, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    
	dxDrawText("Nobre", x*412 + 1, y*191 + 1, x*633 + 1, y*249 + 1, tocolor(0, 0, 0, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    dxDrawText("Nobre", x*412, y*191, x*633, y*249, tocolor(255, 255, 255, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    
	dxDrawText("Monarca",   x*734 + 1, y*191 + 1, x*955 + 1, y*249 + 1, tocolor(0, 0, 0, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    dxDrawText("Monarca",   x*734, y*191, x*955, y*249, tocolor(255, 255, 255, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    
	dxDrawText("Imperial",   x*1034 + 1, y*191 + 1, x*1255 + 1, y*249 + 1, tocolor(0, 0, 0, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    dxDrawText("Imperial",   x*1034, y*191, x*1255, y*249, tocolor(255, 255, 255, 255), x*1.00, "pricedown", "center", "center", false, false, false, false, false)
    
	dxDrawText("Painel VIP - BRASIL CIDADE REAL", x*0 + 1, y*89 + 1, x*1366 + 1, y*153 + 1, tocolor(0, 0, 0, 255), x*1.70, "clear", "center", "center", false, false, false, false, false)
    dxDrawText("Painel VIP - BRASIL CIDADE REAL", x*0, y*89, x*1366, y*153, tocolor(255, 255, 255, 255), x*1.70, "clear", "center", "center", false, false, false, false, false)

end

local AirNewSCR_Remover = { "area_name", "radar", "vehicle_name", "radio" }

function Abrir_Fechar_AirNewSCR ( )
	if Painel_VIP_AirNewSCR == false then
	    for _, v in ipairs( AirNewSCR_Remover ) do
		    setPlayerHudComponentVisible ( v, false )
	    end
		showCursor ( true )
		showChat ( false )
		Painel_VIP_AirNewSCR = true
		addEventHandler ( "onClientRender", getRootElement(), PainelVIP_AirNewSCR )
		playSoundFrontEnd ( 1 )
    else
	    for _, v in ipairs( AirNewSCR_Remover ) do
		    setPlayerHudComponentVisible ( v, true )
	    end
	    showCursor ( false )
		showChat ( true )
		Painel_VIP_AirNewSCR = false
		removeEventHandler ( "onClientRender", getRootElement(), PainelVIP_AirNewSCR )
		playSoundFrontEnd ( 2 )
	end
end
bindKey ( Abrir_Fechar_BindAirNewSCR, "down", Abrir_Fechar_AirNewSCR )

function P ( x, y, Largura, Altura )
	if not isCursorShowing ( ) then
		return false
	end
	local sx, sy = guiGetScreenSize()
	local cx, cy = getCursorPosition()
	local cx, cy = (cx*sx), (cy*sy)
	if (cx >= x and cx <= x + Largura) and (cy >= y and cy <= y + Altura) then
		return true
	else
		return false
	end
end

function Selecionar_Opcao_AirNewSCR ( _, state )
    if Painel_VIP_AirNewSCR == true then
        if state == "down" then
		    if getElementData ( localPlayer, "VIP_01" ) == "Sim" then
                if P ( x*121, y*249, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Bravo", 1 )
                elseif P ( x*121, y*275, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Arma(s)", "Bravo", 1 )
	            elseif P ( x*121, y*301, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Bravo", 1 )
	            end
			end


            ------------------------------- VIP 02 -------------------------------

            if getElementData ( localPlayer, "VIP_02" ) == "Sim" then
                if P ( x*422, y*249, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Nobre", 1 )
                elseif P ( x*422, y*275, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Nobre", 2 )
                elseif P ( x*422, y*301, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Vida", "Nobre", 1 )
                elseif P ( x*422, y*327, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Arma(s)", "Nobre", 1 )
                elseif P ( x*422, y*353, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Nobre", 1 )
                elseif P ( x*422, y*379, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Nobre", 2 )
                end
			end
	
	        ------------------------------- VIP 03 -------------------------------
	
	        if getElementData ( localPlayer, "VIP_03" ) == "Sim" then
	            if P ( x*744, y*249, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Monarca", 1 )
                elseif P ( x*744, y*275, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Monarca", 2 )
                elseif P ( x*744, y*301, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Vida", "Monarca", 1 )
                elseif P ( x*744, y*327, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Colete", "Monarca", 1 )
   	            elseif P ( x*744, y*353, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Arma(s)", "Monarca", 1 )
	            elseif P ( x*744, y*379, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Arma(s)", "Monarca", 2 )
   	            elseif P ( x*744, y*405, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Monarca", 1 )
	            elseif P ( x*744, y*431, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Monarca", 2 )
	            elseif P ( x*744, y*457, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Monarca", 3 )
   	            elseif P ( x*744, y*483, x*201, y*22 ) then
                    if getElementData ( localPlayer, "AirNewSCR_VeiculoColorido" ) == "Não" then
			    	    setElementData ( localPlayer, "AirNewSCR_VeiculoColorido", "Sim" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Monarca", "Função de Veiculo Colorido Ativada!" )
			    	else
			    	    setElementData ( localPlayer, "AirNewSCR_VeiculoColorido", "Não" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Monarca", "Função de Veiculo Colorido Desativada!" )
			    	end
	            elseif P ( x*744, y*509, x*201, y*22 ) then
                    if getElementData ( localPlayer, "AirNewSCR_FarolColorido" ) == "Não" then
			    	    setElementData ( localPlayer, "AirNewSCR_FarolColorido", "Sim" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Monarca", "Função de Farol Colorido Ativada!" )
			    	else
			    	    setElementData ( localPlayer, "AirNewSCR_FarolColorido", "Não" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Monarca", "Função de Farol Colorido Desativada!" )
			    	end
	            end
			end


            ------------------------------- VIP 04 -------------------------------

            if getElementData ( localPlayer, "VIP_04" ) == "Sim" then
                if P ( x*1044, y*249, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Imperial", 1 )
                elseif P ( x*1044, y*275, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Veiculo(s)", "Imperial", 2 )
                elseif P ( x*1044, y*301, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Vida", "Imperial", 1 )
                elseif P ( x*1044, y*327, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Colete", "Imperial", 1 )
                elseif P ( x*1044, y*353, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Arma(s)", "Imperial", 1 )
                elseif P ( x*1044, y*379, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Arma(s)", "Imperial", 2 )
                elseif P ( x*1044, y*405, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Imperial", 1 )
                elseif P ( x*1044, y*431, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Imperial", 2 )
                elseif P ( x*1044, y*457, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Skin(s)", "Imperial", 3 )
                elseif P ( x*1044, y*483, x*201, y*22 ) then
                    if getElementData ( localPlayer, "AirNewSCR_VeiculoColorido" ) == "Não" then
			    	    setElementData ( localPlayer, "AirNewSCR_VeiculoColorido", "Sim" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Imperial", "Função de Veiculo Colorido Ativada!" )
			    	else
			    	    setElementData ( localPlayer, "AirNewSCR_VeiculoColorido", "Não" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Imperial", "Função de Veiculo Colorido Desativada!" )
			    	end
                elseif P ( x*1044, y*509, x*201, y*22 ) then
                    if getElementData ( localPlayer, "AirNewSCR_FarolColorido" ) == "Não" then
			    	    setElementData ( localPlayer, "AirNewSCR_FarolColorido", "Sim" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Imperial", "Função de Farol Colorido Ativada!" )
			    	else
			    	    setElementData ( localPlayer, "AirNewSCR_FarolColorido", "Não" )
						triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Mensagem", "Imperial", "Função de Farol Colorido Desativada!" )
			    	end
                elseif P ( x*1044, y*535, x*201, y*22 ) then
                    triggerServerEvent ( "AirNewSCR_EnviarServidor", localPlayer, "Blindagem", "Imperial", 1 )
                end
			end
        end
    end
end
addEventHandler ( "onClientClick", root, Selecionar_Opcao_AirNewSCR )

AirNewSCR_VeiculoColorido = {}

function VIPCarRainbowVIP ( )
	for _, player in pairs(getElementsByType("player")) do
		if getElementData ( player, "AirNewSCR_VeiculoColorido" ) == "Sim" then
			local vehicle = getPedOccupiedVehicle(player)
			if vehicle then
			  local seat = getPedOccupiedVehicleSeat(localPlayer)
			    if seat == 0 then
				if not AirNewSCR_VeiculoColorido[player] then
					AirNewSCR_VeiculoColorido[player] = 0
					return
				end
				local r, g, b = getVehicleColor(vehicle, true)
				if AirNewSCR_VeiculoColorido[player] == 0 then
					if r < 250  then
						r = r + 3
						if r > 255 then
							r = 250
						end
					else
						AirNewSCR_VeiculoColorido[player] = 1
					end
				end
				if AirNewSCR_VeiculoColorido[player] == 1 then
					if g < 250 then
						g = g + 3
					else
						AirNewSCR_VeiculoColorido[player] = 2
					end
				elseif AirNewSCR_VeiculoColorido[player] == 2 then
					if b < 255 then
						if r > 0 then
							r = r - 3
						else
							r = 0
						end
						b = b + 3
						if b > 255 then
							b = 255
						end
					else
						AirNewSCR_VeiculoColorido[player] = 3
					end
				elseif AirNewSCR_VeiculoColorido[player] == 3 then
					if g > 0 then
						if r > 0 then
							r = r - 3
						else
							r = 0
						end
						g = g - 3
						if g < 0 then
							g = 0
						end
					else
						AirNewSCR_VeiculoColorido[player] = 4
					end
				elseif AirNewSCR_VeiculoColorido[player] == 4 then
					if b > 0 then
						b = b - 3
						if b < 0 then
							b = 0
						end
					else
						b = 0
						AirNewSCR_VeiculoColorido[player] = 0
					end
				end
				if r < 0 then r = 0 end
				if g < 0 then g = 0 end
				if b < 0 then b = 0 end
				setVehicleColor(vehicle, r, g, b)
			end
		end
	end
end
end
addEventHandler ( "onClientPreRender", getRootElement(), VIPCarRainbowVIP )

AirNewSCR_FarolColorido = {}

function Farol_Colorido ( )
	for _, player in pairs(getElementsByType("player")) do
		if getElementData ( player, "AirNewSCR_FarolColorido" ) == "Sim" then
			local vehicle = getPedOccupiedVehicle(player)
			if vehicle then
				if not AirNewSCR_FarolColorido[player] then
					AirNewSCR_FarolColorido[player] = 0
					return
				end
				local r, g, b = getVehicleHeadLightColor(vehicle)
				if AirNewSCR_FarolColorido[player] == 0 then
					if r < 250  then
						r = r + 3
						if r > 255 then
							r = 250
						end
					else
						AirNewSCR_FarolColorido[player] = 1
					end
				end
				if AirNewSCR_FarolColorido[player] == 1 then
					if g < 250 then
						g = g + 3
					else
						AirNewSCR_FarolColorido[player] = 2
					end
				elseif AirNewSCR_FarolColorido[player] == 2 then
					if b < 255 then
						if r > 0 then
							r = r - 3
						else
							r = 0
						end
						b = b + 3
						if b > 255 then
							b = 255
						end
					else
						AirNewSCR_FarolColorido[player] = 3
					end
				elseif AirNewSCR_FarolColorido[player] == 3 then
					if g > 0 then
						if r > 0 then
							r = r - 3
						else
							r = 0
						end
						g = g - 3
						if g < 0 then
							g = 0
						end
					else
						AirNewSCR_FarolColorido[player] = 4
					end
				elseif AirNewSCR_FarolColorido[player] == 4 then
					if b > 0 then
						b = b - 3
						if b < 0 then
							b = 0
						end
					else
						b = 0
						AirNewSCR_FarolColorido[player] = 0
					end
				end
				if r < 0 then r = 0 end
				if g < 0 then g = 0 end
				if b < 0 then b = 0 end
				setVehicleHeadLightColor(vehicle, r, g, b)
			end
		end
	end
end
addEventHandler("onClientPreRender", getRootElement ( ), Farol_Colorido )


SCRIPT DO SERVER:

--[[



 ################################################
 #                                              #
 #              Script Criado Por               #
 #           FACEBOOK.COM/AIRNEWSCR             #
 #                                              #
 #                                              #
 ################################################



--]]

Veiculo_VIPs = {}

Grupo_01 = "Bravo"
VIP_Alpha_ID_Veiculo_01 = 451
VIP_Alpha_Pack_de_Armas_01 = { 1, 22, 22, 25 }
VIP_Alpha_Personagem_01 = 112

Grupo_02 = "Nobre"
VIP_Epsylon_ID_Veiculo_01 = 451
VIP_Epsylon_ID_Veiculo_02 = 522
VIP_Epsylon_Pack_de_Armas_01 = { 29, 32, 1, 22 }
VIP_Epsylon_Personagem_01 = 33
VIP_Epsylon_Personagem_02 = 34
VIP_Epsylon_Vida = 100

Grupo_03 = "Monarca"
VIP_Sigma_ID_Veiculo_01 = 541
VIP_Sigma_ID_Veiculo_02 = 522
VIP_Sigma_Pack_de_Armas_01 = { 30, 24, 4, 34 }
VIP_Sigma_Pack_de_Armas_02 = { 29, 32, 1, 22 }
VIP_Sigma_Personagem_01 = 29
VIP_Sigma_Personagem_02 = 30
VIP_Sigma_Personagem_03 = 32
VIP_Sigma_Vida = 100
VIP_Sigma_Colete = 50

Grupo_04 = "Imperial"
VIP_Omega_ID_Veiculo_01 = 411
VIP_Omega_ID_Veiculo_02 = 522
VIP_Omega_Pack_de_Armas_01 = { 31, 24, 4, 34, 26, 34 }
VIP_Omega_Pack_de_Armas_02 = { 29, 32, 1, 22, 30, 16, 46 }
VIP_Omega_Personagem_01 = 26
VIP_Omega_Personagem_02 = 27
VIP_Omega_Personagem_03 = 28
VIP_Omega_Vida = 100
VIP_Omega_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 == "Bravo" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Alpha_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Nobre" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Epsylon_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Nobre" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Epsylon_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Monarca" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Sigma_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Monarca" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Sigma_ID_Veiculo_02, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Imperial" and ID == 1 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Omega_ID_Veiculo_01, Jogador_X, Jogador_Y, Jogador_Z )
		elseif VIP == "Imperial" and ID == 2 then
		    Veiculo_VIPs[source] = createVehicle ( VIP_Omega_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, "Veículo VIP "..VIP.." criado com sucesso!", "success" )
	elseif Tipo == "Arma(s)" then
		if VIP == "Bravo" and ID == 1 then
		    if getElementData ( source, "Bravo_Arma(s)" ) == "Bloqueado" then
			    exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção temporariamente! [1 minuto]", "warning" )
			else
		        setElementData ( source, "Bravo_Arma(s)", "Bloqueado" ) -- 1 Minuto
		        for _, Armas in ipairs ( VIP_Alpha_Pack_de_Armas_01 ) do
			        giveWeapon ( source, Armas, 999 )
			    end
				exports.Scripts_Dxmessages:outputDx ( source, "Você recebeu o pack de armas do VIP "..VIP.." com sucesso!", "success" )
				setTimer ( setElementData, 60000, 1, source, "Bravo_Arma(s)", "Desbloqueado" )
			end
		elseif VIP == "Nobre" and ID == 1 then
		    if getElementData ( source, "Epsylon_Arma(s)" ) == "Bloqueado" then
                exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção Temporariamente! [10 segundos]", "warning" )
			else
		        setElementData ( source, "Nobre_Arma(s)", "Bloqueado" ) -- 10 Segundos
		        for _, Armas in ipairs ( VIP_Epsylon_Pack_de_Armas_01 ) do
			        giveWeapon ( source, Armas, 999 )
			    end
				exports.Scripts_Dxmessages:outputDx ( source, "Você recebeu o pack de armas do VIP "..VIP.." com sucesso!", "success" )
				setTimer ( setElementData, 10000, 1, source, "Nobre_Arma(s)", "Desbloqueado" )
			end
		elseif VIP == "Monarca" and ID == 1 then
		    for _, Armas in ipairs ( VIP_Sigma_Pack_de_Armas_01 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Monarca" and ID == 2 then
		    for _, Armas in ipairs ( VIP_Sigma_Pack_de_Armas_02 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Imperial" and ID == 1 then
		    for _, Armas in ipairs ( VIP_Omega_Pack_de_Armas_01 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		elseif VIP == "Imperial" and ID == 2 then
		    for _, Armas in ipairs ( VIP_Omega_Pack_de_Armas_02 ) do
			    giveWeapon ( source, Armas, 999 )
			end
		end
		if getElementData ( source, "Bravo_Arma(s)" ) == "Bloqueado" or getElementData ( source, "Nobre_Arma(s)" ) == "Bloqueado" then return end
		exports.Scripts_Dxmessages:outputDx ( source, "Você recebeu o pack de armas do VIP "..VIP.." com sucesso!", "success" )
	elseif Tipo == "Skin(s)" then
		if VIP == "Bravo" and ID == 1 then
		    setElementModel ( source, VIP_Alpha_Personagem_01 )
		elseif VIP == "Nobre" and ID == 1 then
		    setElementModel ( source, VIP_Epsylon_Personagem_01 )
		elseif VIP == "Nobre" and ID == 2 then
		    setElementModel ( source, VIP_Epsylon_Personagem_02 )
		elseif VIP == "Monarca" and ID == 1 then
		    setElementModel ( source, VIP_Sigma_Personagem_01 )
		elseif VIP == "Monarca" and ID == 2 then
		    setElementModel ( source, VIP_Sigma_Personagem_02 )
		elseif VIP == "Monarca" and ID == 3 then
		    setElementModel ( source, VIP_Sigma_Personagem_03 )
		elseif VIP == "Imperial" and ID == 1 then
		    setElementModel ( source, VIP_Omega_Personagem_01 )
		elseif VIP == "Imperial" and ID == 2 then
		    setElementModel ( source, VIP_Omega_Personagem_02 )
		elseif VIP == "Imperial" and ID == 3 then
		    setElementModel ( source, VIP_Omega_Personagem_03 )
		end
		exports.Scripts_Dxmessages:outputDx ( source, "Skin VIP "..VIP.." ID "..ID.." setado com sucesso!", "success" )
	elseif Tipo == "Vida" then
		if VIP == "Nobre" and ID == 1 then
		    if getElementData ( source, "Nobre_Vida" ) == "Bloqueado" then
		        exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção temporariamente! [2 minutos]", "warning" )
			else
				if getElementHealth ( source ) < VIP_Epsylon_Vida then
					setElementData ( source, "Nobre_Vida", "Bloqueado" ) -- 2 Minuto(s)
					setElementHealth ( source, VIP_Epsylon_Vida )
					exports.Scripts_Dxmessages:outputDx ( source, "Sua vida foi alterada para "..VIP_Epsylon_Vida.."% com sucesso!", "success" )
					setTimer ( setElementData, 120000, 1, source, "Nobre_Vida", "Desbloqueado" )
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com mais de "..VIP_Epsylon_Vida.."% de vida!", "error" )
				end
			end		
		elseif VIP == "Monarca" and ID == 1 then
		    if getElementData ( source, "Monarca_Vida" ) == "Bloqueado" then
			    exports.Scripts_Dxmessages:outputDx ( source, "Você está bloqueado de usar está opção temporariamente! [2 minutos]", "warning" )
			else
			    if getElementHealth ( source ) < VIP_Sigma_Vida then
		            setElementData ( source, "Monarca_Vida", "Bloqueado" ) -- 2 Minuto(s)
			        setElementHealth ( source, VIP_Sigma_Vida )
					exports.Scripts_Dxmessages:outputDx ( source, "Sua vida foi alterada para "..VIP_Sigma_Vida.."% com sucesso!", "success" )
					setTimer ( setElementData, 120000, 1, source, "Monarca_Vida", "Desbloqueado" )
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Sigma_Vida.."% de vida!", "error" )
				end
			end
	    elseif VIP == "Imperial" and ID == 1 then
			if getElementHealth ( source ) < VIP_Omega_Vida then
			    setElementHealth ( source, VIP_Omega_Vida )
				exports.Scripts_Dxmessages:outputDx ( source, "Sua vida foi alterada para "..VIP_Omega_Vida.."% com sucesso!", "success" )
			else
				exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Omega_Vida.."% de vida!", "error" )
			end
		end
	elseif Tipo == "Colete" then
	    if VIP == "Monarca" and ID == 1 then
		    if getPedArmor ( source ) < VIP_Sigma_Colete then
		        setPedArmor ( source, VIP_Sigma_Colete )
				exports.Scripts_Dxmessages:outputDx ( source, "Seu colete foi alterado para "..VIP_Sigma_Colete.."% com sucesso!", "success" )
			else
			    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com mais de "..VIP_Sigma_Colete.."% de colete!", "error" )
			end
	    elseif VIP == "Imperial" and ID == 1 then
            if getPedArmor ( source ) < VIP_Omega_Colete then
		        setPedArmor ( source, VIP_Omega_Colete )
				exports.Scripts_Dxmessages:outputDx ( source, "Seu colete foi alterado para "..VIP_Omega_Colete.."% com sucesso!", "success" )
			else
			    exports.Scripts_Dxmessages:outputDx ( source, "Você já está com "..VIP_Omega_Colete.."% de colete!", "error" )
			end
	    end
	elseif Tipo == "Blindagem" then
	    if VIP == "Imperial" 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 veículo atual com sucesso!", "success")
				else
				    exports.Scripts_Dxmessages:outputDx ( source, "O veículo atual já está blindado!", "error")
		        end
	        else
	            exports.Scripts_Dxmessages:outputDx ( source, "Entre em um Veículo para utilizar esta função!", "error")
	        end
	    end
	elseif Tipo == "Mensagem" then
	    if VIP == "Monarca" or VIP == "Imperial" 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 )



Obrigado desde já!!!

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