Thanks, but the doubt still perciste, debugscript shows me error in line 75 "unexpected symbol near ')'" and I did not understand the part of OnClientResourceStart where I need to put, define which function?
Follow the code:
addEventHandler("onClientResourceStart", resourceRoot,
function Window ()
painel = guiCreateWindow(286, 231, 454, 345, "VIP BSA", true)
guiWindowSetSizable(painel, true)
myWindow = guiCreateStaticImage(9, 19, 435, 316, "123.png", false, painel)
button1 = guiCreateButton(0, 229, 140, 49, "Skin VIP", false, myWindow)
button2 = guiCreateButton(150, 229, 140, 49, "Carro VIP", false, myWindow)
button3 = guiCreateButton(295, 229, 140, 49, "Habilidades", false, myWindow)
button4 = guiCreateButton(347, 46, 78, 32, "Fechar", false, myWindow)
guiSetAlpha(button1, 0.20)
guiSetAlpha(button2, 0.20)
guiSetAlpha(button3, 0.20)
guiSetAlpha(button4, 0.20)
if ( guiGetVisible ( painel ) == true ) then --Checking for GUI element, not function
guiSetVisible ( painel, false ) --Fixed args
showCursor ( false )
else
guiSetVisible ( painel, true )
showCursor ( true )
end
end
)
addCommandHandler ("vip", Window)
---------------------------------------------
----------------------------------------------
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
function ( )
if (source == button1) then
local player = getLocalPlayer()
setElementModel ( source, 230 )
outputChatBox ('#000000[#00ffffVoce Acaba De Pega Skin#000000] !',source,255,255,255,true)
--- guiSetVisible( myWindow, false )
--- showCursor( false )
end
end
)
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
function ( )
if (source == button2) then
local player = getLocalPlayer()
if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] )
veh[source] = nil
end
local x,y,z = getElementPosition(source)
veh[source] = createVehicle(411, x,y,z + 2)
outputChatBox ('#000000[#00ffffVoce Acaba De Criar Um Carro#000000] !',source,255,255,255,true)
warpPedIntoVehicle (source,veh[source])
-- guiSetVisible( myWindow, false )
-- showCursor( false )
end
end
)
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
function ( )
if (source == button3) then
local player = getLocalPlayer()
local stat = getPedStat ( source, 1 )
-- Check that getPedStat returned a value
if ( stat > 1000 ) then
outputChatBox ('#000000[#00ffffVoce Pegou Habilidades#000000]!',source,255,255,255,true)
-- guiSetVisible( myWindow, false )
-- showCursor( false )
end
end
)
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
function ( )
if (source == button4) then
local player = getLocalPlayer()
guiSetVisible( myWindow, false )
showCursor( false )
guiSetVisible( myWindow, false )
showCursor( false )
end
end
)