Jump to content

quien me ayuda con un BlindKey


Recommended Posts

Hola, me eh bajado el resource Tuna_Carriet, y me anda de las mil maravillas, y lo optimize para q solu funciona con los miembros del STAFF, pero toca copiar un Comando, y eso termina cansando, un blind para q solo presiones M y te habra el panel de movimiento lo mas de bueno xD, eh intentado con las funciones

bindKey( "m", "down", "[aca iria el nombre del gui supongo]", "")

bindKey( "m", "down", "[lo mismo de arriba]", "")

puse 2, uno para habrir y el otro para cerrar....

supongo q iria asi, y no me funcionan......... en odnde va el nombre del GUI eh puesto GUIness porque mirando el codigo vi q tenia q ser GUIness o si no makeGUI, pero con ninguno de los 2 me funciona.... asi luce,

  
-- Esto es parte del Server SIde, edite el comando le agrege la opcion para el STAFF y la informacion en el chat 
  
function GUIness(source) 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
        triggerClientEvent(source, "makeGUI", root) 
            outputChatBox ( "De Aqui podes Manejar el Barco", source, 0, 255, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
    end 
end 
addCommandHandler("pv", GUIness) 

En el Client Side, esta la informacion de la creacion de la GUI, en donde la ventana principal es cWindow, la agrege en la parte del BindKey y tampoco funciono, no se ya mire la Wiki aqui https://forum.multitheftauto.com/posting.php?mode=post&f=122

creo q un pinche comando me quedo grande D:....:(

pero entonces q estaria mal? tengo q aprender xD

Link to comment

Ok.....

Server Side (Algo Extenso pero Bueno...)

--[[ 
    Aircraft Carrier Server by Tuna 
]]-- 
  
local hullx = -1357.7117919922 
local hully = 532.47308349609 
local hullz = 5.5571422576904 
  
local cH = createObject(10771, -1357.7117919922, 532.47308349609, 5.5571422576904) -- carrier hull 
local cL = createObject(11145, -1420.6689453125, 532.482421875, 4.378999710083) -- carrier lowdeck 
local cHa = createObject(11146, -1366.7033691406, 533.04119873047, 12.420551300049) -- carrier hangar 
local cB = createObject(10770, -1354.3937988281, 524.93719482422, 38.597640991211) -- carrier bridge 
local cBi = createObject(11237, -1354.4262695313, 524.74877929688, 38.529960632324) -- carrier bits 
local cLi = createObject(3115, -1456.7243652344, 532.509765625, 10.010332107544) -- carrier lift  
local cLi2 = createObject(3114, -1414.4064941406, 547.54791259766, 9.7388973236084) -- carrier lift 2 
local cIn = createObject(10772, -1356.3599853516, 532.47290039063, 17.386043548584) -- carrier lines 
local cIn2 = createObject(10772, -1356.3599853516, 532.47290039063, 10.330332107544) -- carrier lines 2 (invisible in hangar) 
local cD = createObject(3113, -1465.7409667969, 532.85229492188, 1.2527737617493) -- carrier door 
local cC = createObject(11149, -1363.7884521484, 527.28692626953, 12.11157989502) -- carrier corridiors 
local cSB1 = createObject(3885, -1394.6096191406, 525.0712890625, 18.118799209595) -- carrier sam base 1 
local cSB2 = createObject(3885, -1324.1744384766, 524.89855957031, 20.940547943115) -- carrier sam base 2 
local cSS1 = createObject(3884, -1324.0531005859, 525.56842041016, 21.032855606079) -- carrier sam site 1 
local cSS2 = createObject(3884, -1394.2770996094, 525.51947021484, 18.218799209595) -- carrier sam site 2 
  
attachElements(cL, cH, -1420.6689453125 - hullx, 532.482421875 - hully, 4.378999710083 - hullz) 
attachElements(cHa, cH, -1366.7033691406 - hullx, 533.04119873047 - hully, 12.420551300049 - hullz) 
attachElements(cB, cH, -1354.3937988281 - hullx, 524.93719482422 - hully, 38.597640991211 - hullz) 
attachElements(cBi, cH, -1354.4262695313 - hullx, 524.74877929688 - hully, 38.529960632324 - hullz) 
attachElements(cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) 
attachElements(cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) 
attachElements(cIn, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 17.386043548584 - hullz) 
attachElements(cIn2, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 10.330332107544 - hullz) 
attachElements(cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) 
attachElements(cC, cH, -1363.7884521484 - hullx, 527.28692626953 - hully, 12.11157989502 - hullz) 
attachElements(cSB1, cH, -1394.6096191406 - hullx, 525.0712890625 - hully, 18.118799209595 - hullz) 
attachElements(cSB2, cH, -1324.1744384766 - hullx, 524.89855957031 - hully, 20.940547943115 - hullz) 
attachElements(cSS1, cH, -1324.0531005859 - hullx, 525.56842041016 - hully, 21.032855606079 - hullz) 
attachElements(cSS2, cH, -1394.2770996094 - hullx, 525.51947021484 - hully, 18.218799209595 - hullz) 
  
function GUIness(source) 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
        triggerClientEvent(source, "makeGUI", root) 
            outputChatBox ( "De Aqui podes Manejar el Barco", source, 0, 255, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
    end 
end 
addCommandHandler("pv", GUIness) 
  
function goToCarrier(source) 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
        local x,y,z = getElementPosition(cH) 
        setElementPosition(source, x, y, z + 15) 
            outputChatBox ( "Bienvenido al Porta Aviones "..getPlayerName(source).." !", source, 0, 255, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
    end 
end 
addCommandHandler("irpv", goToCarrier) 
  
function setCarrierHeightFunc(playerSource, commandName, height) 
    if (height) then 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
            local x,y,z = getElementPosition(cH) 
            setElementPosition(cH, x, y, tonumber(height)) 
        outputChatBox ( "El Porta Aviones a sido regresado a su Posicion Original.", 255, 0, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
        end 
    end 
end 
addCommandHandler("recolocar", setCarrierHeightFunc) 
  
function stopCaFunc() 
    stopObject(cH) 
end 
addEvent("stopCarrier", true) 
addEventHandler("stopCarrier", root, stopCaFunc) 
  
function fixDetach(obj) 
    local x, y, z = getElementPosition(obj) 
    local rx, ry, rz = getElementRotation(obj) 
    detachElements(obj) 
    setElementPosition(obj, x, y, z) 
    setElementRotation(obj, rx, ry, rz) 
    return x, y, z 
end 
  
-- Carrier back door 
function cDoorOpen() 
    local x, y, z = fixDetach(cD) 
    moveObject(cD, 3000, x - 3, y, z + 10) 
    setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx - 3, 532.85229492188 - hully, 1.2527737617493 - hullz + 10) 
end 
addEvent("rearDoorBut", true) 
addEventHandler("rearDoorBut", root, cDoorOpen) 
  
function cDoorClose() 
    local x, y, z = fixDetach(cD) 
    moveObject(cD, 3000, x + 3, y, z - 10) 
    setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) 
end 
addEvent("rearDoorButD", true) 
addEventHandler("rearDoorButD", root, cDoorClose) 
  
-- Carrier main lift 
function cMainLiftUp() 
    local x, y, z = fixDetach(cLi) 
    moveObject(cLi, 3000, x, y, z + 7) 
    setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz + 7) 
end 
addEvent("mainLiftBut", true) 
addEventHandler("mainLiftBut", root, cMainLiftUp) 
  
function cMainLiftDown() 
    local x, y, z = fixDetach(cLi) 
    moveObject(cLi, 3000, x, y, z - 7) 
    setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) 
end 
addEvent("mainLiftButD", true) 
addEventHandler("mainLiftButD", root, cMainLiftDown) 
  
-- Carrier side lift down 
function cSideLiftUp() 
    local x, y, z = fixDetach(cLi2) 
    moveObject(cLi2, 3000, x, y, z + 7) 
    setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz + 7) 
end 
addEvent("sideLiftBut", true) 
addEventHandler("sideLiftBut", root, cSideLiftUp) 
  
function cSideLiftDown() 
    local x, y, z = fixDetach(cLi2) 
    moveObject(cLi2, 3000, x, y, z - 7) 
    setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) 
end 
addEvent("sideLiftButD", true) 
addEventHandler("sideLiftButD", root, cSideLiftDown) 
  
-- Carrier raise/lower/reset 
function carrierHeightFunc(theValue) 
    local x, y, z = getElementPosition(cH) 
    if (theValue == 5.5) then 
        moveObject(cH, 0, x, y, 5.5) 
    else 
        moveObject(cH, 5000, x, y, z + theValue) 
    end 
end 
addEvent("carrierHeight", true) 
addEventHandler("carrierHeight", root, carrierHeightFunc) 
  
-- Carrier warper 
function carrierWarper(x, y, z) 
    moveObject(cH, 0, x, y, z) 
end 
addEvent("moveToBut", true) 
addEventHandler("moveToBut", root, carrierWarper) 
  
-- Directional movement controls 
function carrierMove(, yD, zD) 
    local x,y,z = getElementPosition(cH) 
    moveObject(cH, 20000, x + , y + yD, z + zD) 
end 
addEvent("carrierMoveEvent", true) 
addEventHandler("carrierMoveEvent", root, carrierMove) 
  
-- Rotational movement controls 
function carrierRotateFunc(rX, rY, rZ) 
    local x,y,z = getElementPosition(cH) 
    moveObject(cH, 5000, x, y, z, rX, rY, rZ) 
end 
addEvent("carrierRotate", true) 
addEventHandler("carrierRotate", root, carrierRotateFunc) 

Link to comment
--[[ 
    Aircraft Carrier Server by Tuna 
]]-- 
  
local hullx = -1357.7117919922 
local hully = 532.47308349609 
local hullz = 5.5571422576904 
  
local cH = createObject(10771, -1357.7117919922, 532.47308349609, 5.5571422576904) -- carrier hull 
local cL = createObject(11145, -1420.6689453125, 532.482421875, 4.378999710083) -- carrier lowdeck 
local cHa = createObject(11146, -1366.7033691406, 533.04119873047, 12.420551300049) -- carrier hangar 
local cB = createObject(10770, -1354.3937988281, 524.93719482422, 38.597640991211) -- carrier bridge 
local cBi = createObject(11237, -1354.4262695313, 524.74877929688, 38.529960632324) -- carrier bits 
local cLi = createObject(3115, -1456.7243652344, 532.509765625, 10.010332107544) -- carrier lift 
local cLi2 = createObject(3114, -1414.4064941406, 547.54791259766, 9.7388973236084) -- carrier lift 2 
local cIn = createObject(10772, -1356.3599853516, 532.47290039063, 17.386043548584) -- carrier lines 
local cIn2 = createObject(10772, -1356.3599853516, 532.47290039063, 10.330332107544) -- carrier lines 2 (invisible in hangar) 
local cD = createObject(3113, -1465.7409667969, 532.85229492188, 1.2527737617493) -- carrier door 
local cC = createObject(11149, -1363.7884521484, 527.28692626953, 12.11157989502) -- carrier corridiors 
local cSB1 = createObject(3885, -1394.6096191406, 525.0712890625, 18.118799209595) -- carrier sam base 1 
local cSB2 = createObject(3885, -1324.1744384766, 524.89855957031, 20.940547943115) -- carrier sam base 2 
local cSS1 = createObject(3884, -1324.0531005859, 525.56842041016, 21.032855606079) -- carrier sam site 1 
local cSS2 = createObject(3884, -1394.2770996094, 525.51947021484, 18.218799209595) -- carrier sam site 2 
  
attachElements(cL, cH, -1420.6689453125 - hullx, 532.482421875 - hully, 4.378999710083 - hullz) 
attachElements(cHa, cH, -1366.7033691406 - hullx, 533.04119873047 - hully, 12.420551300049 - hullz) 
attachElements(cB, cH, -1354.3937988281 - hullx, 524.93719482422 - hully, 38.597640991211 - hullz) 
attachElements(cBi, cH, -1354.4262695313 - hullx, 524.74877929688 - hully, 38.529960632324 - hullz) 
attachElements(cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) 
attachElements(cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) 
attachElements(cIn, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 17.386043548584 - hullz) 
attachElements(cIn2, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 10.330332107544 - hullz) 
attachElements(cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) 
attachElements(cC, cH, -1363.7884521484 - hullx, 527.28692626953 - hully, 12.11157989502 - hullz) 
attachElements(cSB1, cH, -1394.6096191406 - hullx, 525.0712890625 - hully, 18.118799209595 - hullz) 
attachElements(cSB2, cH, -1324.1744384766 - hullx, 524.89855957031 - hully, 20.940547943115 - hullz) 
attachElements(cSS1, cH, -1324.0531005859 - hullx, 525.56842041016 - hully, 21.032855606079 - hullz) 
attachElements(cSS2, cH, -1394.2770996094 - hullx, 525.51947021484 - hully, 18.218799209595 - hullz) 
  
function GUIness(source) 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
        triggerClientEvent(source, "makeGUI", root) 
            outputChatBox ( "De Aqui podes Manejar el Barco", source, 0, 255, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
    end 
end 
addCommandHandler("pv", GUIness) 
  
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), 
function () 
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
    bindKey ( player, "M", "down", GUIness ) 
    end 
end) 
  
addEventHandler ( "onPlayerJoin", getRootElement(), 
function () 
    bindKey ( source, "M", "down", GUIness ) 
end) 
  
addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), 
function () 
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
    unbindKey ( player, "M", "down", GUIness ) 
    end 
end) 
  
function goToCarrier(source) 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
        local x,y,z = getElementPosition(cH) 
        setElementPosition(source, x, y, z + 15) 
            outputChatBox ( "Bienvenido al Porta Aviones "..getPlayerName(source).." !", source, 0, 255, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
    end 
end 
addCommandHandler("irpv", goToCarrier) 
  
function setCarrierHeightFunc(playerSource, commandName, height) 
    if (height) then 
    if hasObjectPermissionTo( source, 'general.adminpanel', true ) then 
            local x,y,z = getElementPosition(cH) 
            setElementPosition(cH, x, y, tonumber(height)) 
        outputChatBox ( "El Porta Aviones a sido regresado a su Posicion Original.", 255, 0, 0) 
    else     
        outputChatBox ( "No puedes usar esto, nesecitas ser parte del STAFF.", source, 255, 0, 0) 
        end 
    end 
end 
addCommandHandler("recolocar", setCarrierHeightFunc) 
  
function stopCaFunc() 
    stopObject(cH) 
end 
addEvent("stopCarrier", true) 
addEventHandler("stopCarrier", root, stopCaFunc) 
  
function fixDetach(obj) 
    local x, y, z = getElementPosition(obj) 
    local rx, ry, rz = getElementRotation(obj) 
    detachElements(obj) 
    setElementPosition(obj, x, y, z) 
    setElementRotation(obj, rx, ry, rz) 
    return x, y, z 
end 
  
-- Carrier back door 
function cDoorOpen() 
    local x, y, z = fixDetach(cD) 
    moveObject(cD, 3000, x - 3, y, z + 10) 
    setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx - 3, 532.85229492188 - hully, 1.2527737617493 - hullz + 10) 
end 
addEvent("rearDoorBut", true) 
addEventHandler("rearDoorBut", root, cDoorOpen) 
  
function cDoorClose() 
    local x, y, z = fixDetach(cD) 
    moveObject(cD, 3000, x + 3, y, z - 10) 
    setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) 
end 
addEvent("rearDoorButD", true) 
addEventHandler("rearDoorButD", root, cDoorClose) 
  
-- Carrier main lift 
function cMainLiftUp() 
    local x, y, z = fixDetach(cLi) 
    moveObject(cLi, 3000, x, y, z + 7) 
    setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz + 7) 
end 
addEvent("mainLiftBut", true) 
addEventHandler("mainLiftBut", root, cMainLiftUp) 
  
function cMainLiftDown() 
    local x, y, z = fixDetach(cLi) 
    moveObject(cLi, 3000, x, y, z - 7) 
    setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) 
end 
addEvent("mainLiftButD", true) 
addEventHandler("mainLiftButD", root, cMainLiftDown) 
  
-- Carrier side lift down 
function cSideLiftUp() 
    local x, y, z = fixDetach(cLi2) 
    moveObject(cLi2, 3000, x, y, z + 7) 
    setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz + 7) 
end 
addEvent("sideLiftBut", true) 
addEventHandler("sideLiftBut", root, cSideLiftUp) 
  
function cSideLiftDown() 
    local x, y, z = fixDetach(cLi2) 
    moveObject(cLi2, 3000, x, y, z - 7) 
    setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) 
end 
addEvent("sideLiftButD", true) 
addEventHandler("sideLiftButD", root, cSideLiftDown) 
  
-- Carrier raise/lower/reset 
function carrierHeightFunc(theValue) 
    local x, y, z = getElementPosition(cH) 
    if (theValue == 5.5) then 
        moveObject(cH, 0, x, y, 5.5) 
    else 
        moveObject(cH, 5000, x, y, z + theValue) 
    end 
end 
addEvent("carrierHeight", true) 
addEventHandler("carrierHeight", root, carrierHeightFunc) 
  
-- Carrier warper 
function carrierWarper(x, y, z) 
    moveObject(cH, 0, x, y, z) 
end 
addEvent("moveToBut", true) 
addEventHandler("moveToBut", root, carrierWarper) 
  
-- Directional movement controls 
function carrierMove(, yD, zD) 
    local x,y,z = getElementPosition(cH) 
    moveObject(cH, 20000, x + , y + yD, z + zD) 
end 
addEvent("carrierMoveEvent", true) 
addEventHandler("carrierMoveEvent", root, carrierMove) 
  
-- Rotational movement controls 
function carrierRotateFunc(rX, rY, rZ) 
    local x,y,z = getElementPosition(cH) 
    moveObject(cH, 5000, x, y, z, rX, rY, rZ) 
end 
addEvent("carrierRotate", true) 
addEventHandler("carrierRotate", root, carrierRotateFunc) 

Link to comment

como digas.....

despues de todo TU eres el master xD

--[[ 
    Carrier Client by Tuna. 
]]-- 
local resX, resY = guiGetScreenSize() 
  
function createGUI(thePlayer) 
    cWindow =   guiCreateWindow((resX/2)-315,(resY/2)-100,629,200,"Control del Porta Aviones!",false) 
    buttonSAC = guiCreateButton(0.3418,0.485,0.0668,0.195,"X",true,cWindow) 
    NW =        guiCreateButton(0.2655,0.255,0.0668,0.195,"NW",true,cWindow) 
    N =         guiCreateButton(0.3418,0.255,0.0668,0.195,"N",true,cWindow) 
    NE =        guiCreateButton(0.4213,0.26,0.0668,0.195,"NE",true,cWindow) 
    W =         guiCreateButton(0.2671,0.485,0.0668,0.195,"W",true,cWindow) 
    E =         guiCreateButton(0.4213,0.49,0.0668,0.195,"E",true,cWindow) 
    SW =        guiCreateButton(0.2671,0.73,0.0668,0.195,"SW",true,cWindow) 
    S =         guiCreateButton(0.3434,0.73,0.0668,0.195,"S",true,cWindow) 
    SE =        guiCreateButton(0.4213,0.725,0.0668,0.195,"SE",true,cWindow) 
    NWr =       guiCreateButton(0.5119,0.26,0.0668,0.195,"45",true,cWindow) 
    GoUp =      guiCreateButton(0.5919,0.26,0.0668,0.195,"Up",true,cWindow) 
    resetH =    guiCreateButton(0.6750,0.12,0.0600,0.1,"R",true,cWindow) 
    NEr =       guiCreateButton(0.6693,0.26,0.0668,0.195,"45",true,cWindow) 
    Wr =        guiCreateButton(0.5119,0.49,0.0668,0.195,"90",true,cWindow) 
    GoDn =      guiCreateButton(0.5919,0.49,0.0668,0.195,"Dn",true,cWindow) 
    Er =        guiCreateButton(0.6693,0.495,0.0668,0.195,"90",true,cWindow) 
    button1 =   guiCreateButton(0.0143,0.26,0.1113,0.195,"Open Rear Door",true,cWindow) 
    button2 =   guiCreateButton(0.0143,0.49,0.1113,0.195,"Raise Main Lift",true,cWindow) 
    button3 =   guiCreateButton(0.0143,0.72,0.1113,0.195,"Raise Side Lift",true,cWindow) 
    buttonA =   guiCreateButton(0.1430,0.26,0.1113,0.195,"Close Rear Door",true,cWindow) 
    buttonB =   guiCreateButton(0.1430,0.49,0.1113,0.195,"Lower Main Lift",true,cWindow) 
    buttonC =   guiCreateButton(0.1430,0.72,0.1113,0.195,"Lower Side Lift",true,cWindow) 
    button4 =   guiCreateButton(0.7663,0.26,0.213,0.195,"Move to LS",true,cWindow) 
    button5 =   guiCreateButton(0.7663,0.495,0.213,0.195,"Move to SF",true,cWindow) 
    button6 =   guiCreateButton(0.7663,0.725,0.213,0.195,"Move to LV",true,cWindow) 
    button7 =   guiCreateButton(0.5175,0.725,0.213,0.195,"Done",true,cWindow) 
    GUIEditor_Label1 = guiCreateLabel(0.2766,0.125,0.2051,0.075," - Movement Controls -",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label1,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label1,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label1,"left",false) 
    GUIEditor_Label2 = guiCreateLabel(0.5158,0.125,0.1781,0.08,"Rotation Controls",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label2,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label2,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label2,"left",false) 
    GUIEditor_Label3 = guiCreateLabel(0.806,0.125,0.1669,0.0739,"Warp Controls",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label3,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label3,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label3,"left",false) 
    GUIEditor_Label4 = guiCreateLabel(0.0525,0.135,0.1669,0.0739,"Door/Lift Controls",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label4,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label4,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label4,"left",false) 
    addEventHandler("onClientGUIClick", GoUp, function() triggerServerEvent("carrierHeight", root, 3) end, false) 
    addEventHandler("onClientGUIClick", GoDn, function() triggerServerEvent("carrierHeight", root, -3) end, false) 
    addEventHandler("onClientGUIClick", resetH, function() triggerServerEvent("carrierHeight", root, 5.5) end, false) 
    addEventHandler("onClientGUIClick", buttonSAC, function() triggerServerEvent("stopCarrier", root) end, false) 
    addEventHandler("onClientGUIClick", button1, function() triggerServerEvent("rearDoorBut", root) end, false) 
    addEventHandler("onClientGUIClick", button2, function() triggerServerEvent("mainLiftBut", root) end, false) 
    addEventHandler("onClientGUIClick", button3, function() triggerServerEvent("sideLiftBut", root) end, false) 
    addEventHandler("onClientGUIClick", buttonA, function() triggerServerEvent("rearDoorButD", root) end, false) 
    addEventHandler("onClientGUIClick", buttonB, function() triggerServerEvent("mainLiftButD", root) end, false) 
    addEventHandler("onClientGUIClick", buttonC, function() triggerServerEvent("sideLiftButD", root) end, false) 
    addEventHandler("onClientGUIClick", button4, function() triggerServerEvent("moveToBut", root, 835.6, -2086, 5) end, false) 
    addEventHandler("onClientGUIClick", button5, function() triggerServerEvent("moveToBut", root, -1357.7, 532.4, 5.5) end, false) 
    addEventHandler("onClientGUIClick", button6, function() triggerServerEvent("moveToBut", root, 2415, 507, 5) end, false) 
    addEventHandler("onClientGUIClick", button7, closeCgui, false) 
    addEventHandler("onClientGUIClick", NW, function() triggerServerEvent("carrierMoveEvent", root, -160, 160, 0) end, false) 
    addEventHandler("onClientGUIClick", N, function() triggerServerEvent("carrierMoveEvent", root, 0, 160, 0) end, false) 
    addEventHandler("onClientGUIClick", NE, function() triggerServerEvent("carrierMoveEvent", root, 160, 160, 0) end, false) 
    addEventHandler("onClientGUIClick", E, function() triggerServerEvent("carrierMoveEvent", root, 160, 0, 0) end, false) 
    addEventHandler("onClientGUIClick", SE, function() triggerServerEvent("carrierMoveEvent", root, 160, -160, 0) end, false) 
    addEventHandler("onClientGUIClick", S, function() triggerServerEvent("carrierMoveEvent", root, 0, -160, 0) end, false) 
    addEventHandler("onClientGUIClick", SW, function() triggerServerEvent("carrierMoveEvent", root, -160, -160, 0) end, false) 
    addEventHandler("onClientGUIClick", W, function() triggerServerEvent("carrierMoveEvent", root, -160, 0, 0) end, false) 
    addEventHandler("onClientGUIClick", NWr, function() triggerServerEvent("carrierRotate", root, 0, 0, 45) end, false) 
    addEventHandler("onClientGUIClick", NEr, function() triggerServerEvent("carrierRotate", root, 0, 0, -45) end, false) 
    addEventHandler("onClientGUIClick", Er, function() triggerServerEvent("carrierRotate", root, 0, 0, -90) end, false) 
    addEventHandler("onClientGUIClick", Wr, function() triggerServerEvent("carrierRotate", root, 0, 0, 90) end, false) 
    guiSetVisible(cWindow, false) 
end 
addEventHandler("onClientResourceStart", resourceRoot, createGUI) 
  
function openGUI(thePlayer) 
    if (cWindow ~= nil) then 
        guiSetVisible(cWindow, true) 
        showCursor(true) 
    end 
end 
addEvent("makeGUI", true) 
addEventHandler("makeGUI", getLocalPlayer(), openGUI) 
  
function closeCgui() 
    guiSetVisible (cWindow, false) 
    showCursor(false) 
end 
  

Link to comment
--[[ 
    Carrier Client by Tuna. 
]]-- 
local resX, resY = guiGetScreenSize() 
  
function createGUI(thePlayer) 
    cWindow =   guiCreateWindow((resX/2)-315,(resY/2)-100,629,200,"Control del Porta Aviones!",false) 
    buttonSAC = guiCreateButton(0.3418,0.485,0.0668,0.195,"X",true,cWindow) 
    NW =        guiCreateButton(0.2655,0.255,0.0668,0.195,"NW",true,cWindow) 
    N =         guiCreateButton(0.3418,0.255,0.0668,0.195,"N",true,cWindow) 
    NE =        guiCreateButton(0.4213,0.26,0.0668,0.195,"NE",true,cWindow) 
    W =         guiCreateButton(0.2671,0.485,0.0668,0.195,"W",true,cWindow) 
    E =         guiCreateButton(0.4213,0.49,0.0668,0.195,"E",true,cWindow) 
    SW =        guiCreateButton(0.2671,0.73,0.0668,0.195,"SW",true,cWindow) 
    S =         guiCreateButton(0.3434,0.73,0.0668,0.195,"S",true,cWindow) 
    SE =        guiCreateButton(0.4213,0.725,0.0668,0.195,"SE",true,cWindow) 
    NWr =       guiCreateButton(0.5119,0.26,0.0668,0.195,"45",true,cWindow) 
    GoUp =      guiCreateButton(0.5919,0.26,0.0668,0.195,"Up",true,cWindow) 
    resetH =    guiCreateButton(0.6750,0.12,0.0600,0.1,"R",true,cWindow) 
    NEr =       guiCreateButton(0.6693,0.26,0.0668,0.195,"45",true,cWindow) 
    Wr =        guiCreateButton(0.5119,0.49,0.0668,0.195,"90",true,cWindow) 
    GoDn =      guiCreateButton(0.5919,0.49,0.0668,0.195,"Dn",true,cWindow) 
    Er =        guiCreateButton(0.6693,0.495,0.0668,0.195,"90",true,cWindow) 
    button1 =   guiCreateButton(0.0143,0.26,0.1113,0.195,"Open Rear Door",true,cWindow) 
    button2 =   guiCreateButton(0.0143,0.49,0.1113,0.195,"Raise Main Lift",true,cWindow) 
    button3 =   guiCreateButton(0.0143,0.72,0.1113,0.195,"Raise Side Lift",true,cWindow) 
    buttonA =   guiCreateButton(0.1430,0.26,0.1113,0.195,"Close Rear Door",true,cWindow) 
    buttonB =   guiCreateButton(0.1430,0.49,0.1113,0.195,"Lower Main Lift",true,cWindow) 
    buttonC =   guiCreateButton(0.1430,0.72,0.1113,0.195,"Lower Side Lift",true,cWindow) 
    button4 =   guiCreateButton(0.7663,0.26,0.213,0.195,"Move to LS",true,cWindow) 
    button5 =   guiCreateButton(0.7663,0.495,0.213,0.195,"Move to SF",true,cWindow) 
    button6 =   guiCreateButton(0.7663,0.725,0.213,0.195,"Move to LV",true,cWindow) 
    button7 =   guiCreateButton(0.5175,0.725,0.213,0.195,"Done",true,cWindow) 
    GUIEditor_Label1 = guiCreateLabel(0.2766,0.125,0.2051,0.075," - Movement Controls -",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label1,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label1,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label1,"left",false) 
    GUIEditor_Label2 = guiCreateLabel(0.5158,0.125,0.1781,0.08,"Rotation Controls",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label2,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label2,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label2,"left",false) 
    GUIEditor_Label3 = guiCreateLabel(0.806,0.125,0.1669,0.0739,"Warp Controls",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label3,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label3,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label3,"left",false) 
    GUIEditor_Label4 = guiCreateLabel(0.0525,0.135,0.1669,0.0739,"Door/Lift Controls",true,cWindow) 
    guiLabelSetColor(GUIEditor_Label4,255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label4,"top") 
    guiLabelSetHorizontalAlign(GUIEditor_Label4,"left",false) 
    addEventHandler("onClientGUIClick", GoUp, function() triggerServerEvent("carrierHeight", root, 3) end, false) 
    addEventHandler("onClientGUIClick", GoDn, function() triggerServerEvent("carrierHeight", root, -3) end, false) 
    addEventHandler("onClientGUIClick", resetH, function() triggerServerEvent("carrierHeight", root, 5.5) end, false) 
    addEventHandler("onClientGUIClick", buttonSAC, function() triggerServerEvent("stopCarrier", root) end, false) 
    addEventHandler("onClientGUIClick", button1, function() triggerServerEvent("rearDoorBut", root) end, false) 
    addEventHandler("onClientGUIClick", button2, function() triggerServerEvent("mainLiftBut", root) end, false) 
    addEventHandler("onClientGUIClick", button3, function() triggerServerEvent("sideLiftBut", root) end, false) 
    addEventHandler("onClientGUIClick", buttonA, function() triggerServerEvent("rearDoorButD", root) end, false) 
    addEventHandler("onClientGUIClick", buttonB, function() triggerServerEvent("mainLiftButD", root) end, false) 
    addEventHandler("onClientGUIClick", buttonC, function() triggerServerEvent("sideLiftButD", root) end, false) 
    addEventHandler("onClientGUIClick", button4, function() triggerServerEvent("moveToBut", root, 835.6, -2086, 5) end, false) 
    addEventHandler("onClientGUIClick", button5, function() triggerServerEvent("moveToBut", root, -1357.7, 532.4, 5.5) end, false) 
    addEventHandler("onClientGUIClick", button6, function() triggerServerEvent("moveToBut", root, 2415, 507, 5) end, false) 
    addEventHandler("onClientGUIClick", button7, closeCgui, false) 
    addEventHandler("onClientGUIClick", NW, function() triggerServerEvent("carrierMoveEvent", root, -160, 160, 0) end, false) 
    addEventHandler("onClientGUIClick", N, function() triggerServerEvent("carrierMoveEvent", root, 0, 160, 0) end, false) 
    addEventHandler("onClientGUIClick", NE, function() triggerServerEvent("carrierMoveEvent", root, 160, 160, 0) end, false) 
    addEventHandler("onClientGUIClick", E, function() triggerServerEvent("carrierMoveEvent", root, 160, 0, 0) end, false) 
    addEventHandler("onClientGUIClick", SE, function() triggerServerEvent("carrierMoveEvent", root, 160, -160, 0) end, false) 
    addEventHandler("onClientGUIClick", S, function() triggerServerEvent("carrierMoveEvent", root, 0, -160, 0) end, false) 
    addEventHandler("onClientGUIClick", SW, function() triggerServerEvent("carrierMoveEvent", root, -160, -160, 0) end, false) 
    addEventHandler("onClientGUIClick", W, function() triggerServerEvent("carrierMoveEvent", root, -160, 0, 0) end, false) 
    addEventHandler("onClientGUIClick", NWr, function() triggerServerEvent("carrierRotate", root, 0, 0, 45) end, false) 
    addEventHandler("onClientGUIClick", NEr, function() triggerServerEvent("carrierRotate", root, 0, 0, -45) end, false) 
    addEventHandler("onClientGUIClick", Er, function() triggerServerEvent("carrierRotate", root, 0, 0, -90) end, false) 
    addEventHandler("onClientGUIClick", Wr, function() triggerServerEvent("carrierRotate", root, 0, 0, 90) end, false) 
    guiSetVisible(cWindow, false) 
end 
addEventHandler("onClientResourceStart", resourceRoot, createGUI) 
  
function openGUI(thePlayer) 
    if (cWindow ~= nil) then 
        guiSetVisible(cWindow, not guiGetVisible(cWindow)) 
        showCursor(not isCursorShowing()) 
    end 
end 
addEvent("makeGUI", true) 
addEventHandler("makeGUI", getLocalPlayer(), openGUI) 
  
function closeCgui() 
    guiSetVisible (cWindow, false) 
    showCursor(false) 
end 

Link to comment

no se si cerrar errr mio, pues tengo 4 scripts q usan la misma energia del original, y aveces estos scripts, pues le resplazo la misma linea del client side, y aveces el cursos se queda pegado pero el panel se elimina o no se crea cursor y el panel quda alli

Link to comment

jajaja no man olvidalo ya se porque se quedaba el mouse pegado, y si, este script Tune_Carrier, en MTA Resource lo han editado, para asi crear distintos barcos basados en un script original...entonces una vez me funciono el primero el Tuna Carrier pude reemplazar y tocar solo lo nesesario en los edmas

y el mouse se traba esque en mi server el script se abre con "M"=Tuna Carrier, "," y "." 2 barcos cargueros, lo q pasa si habro digamos el M y el de "," al vez el mouse se pega pero solo es eso funciona bien perdna la molestia jajaj

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...