Ok, so you're looking for something like this, however it's not going to work unless you have the following variables defined somewhere else in the script:
- on
- Ativo
- off
- Garagem
function guiPart()
f1 = guiCreateButton(logX-recX/2+(recX-cancelX-okX+375), logY+fAltUser*2+sep*3-47,okX-70, recY-375, "", false)
f2 = guiCreateButton(logX-recX/2+(recX-cancelX-okX+375), logY+fAltUser*2+sep*3-2,okX-70, recY-375, "F2", false)
f3 = guiCreateButton(logX-recX/2+(recX-cancelX-okX+375), logY+fAltUser*2+sep*3+43,okX-70, recY-375, "F2", false)
guiSetAlpha ( f1, 0 )
guiSetAlpha ( f2, 0 )
guiSetAlpha ( f3, 0 )
end
function MouseClick ( button, state )
if ( button == "left" ) then
if ( source == f1 ) then
triggerServerEvent("Ativo", getLocalPlayer(), getLocalPlayer(), Ativo);
ori9 = on;
else
triggerServerEvent("Garagem", getLocalPlayer(), getLocalPlayer(), Garagem);
ori9 = off;
end
end
end
addEventHandler ( "onClientGUIClick", root, MouseClick );