-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
function panel() panel = guiCreateWindow(473,188,281,381,"Nitro & Car panel by: ScorpVI",false) guiSetVisible(panel, false) close = guiCreateButton(203,348,67,24,"Close",false,panel) N1 = guiCreateButton(13,39,86,37,"Nitro x2",false,panel) N2 = guiCreateButton(13,141,86,37,"Nitro x10",false,panel) N3 = guiCreateButton(14,90,86,37,"Nitro x5",false,panel) Infernus = guiCreateButton(15,197,237,34,"Infernus",false,panel) dumper = guiCreateButton(18,287,237,34,"Dumper",false,panel) bullet = guiCreateButton(16,241,237,34,"Bullet",false,panel) Imagen = guiCreateStaticImage(118,54,145,110,"images/mtalogo.png",false,panel) addEventHandler ( "onClientGUIClick", close, Exit, false ) addEventHandler ( "onClientGUIClick", Infernus, infernu, false ) addEventHandler ( "onClientGUIClick", dumper, dumpe, false ) addEventHandler ( "onClientGUIClick", bullet, bulle, false ) addEventHandler ( "onClientGUIClick", N1, Nitro1, false ) addEventHandler ( "onClientGUIClick", N2, Nitro2, false ) addEventHandler ( "onClientGUIClick", N3, Nitro3, false ) end addEventHandler("onClientGUIClick", getRootElement(), panel) function Open () guiSetVisible(panel, true) showCursor(true) end bindKey("F2", "down", open) function Exit () guiSetVisible (panel, false ) showCursor ( false ) end function infernu() Jugador = getLocalPlayer () x,y,z = getElementPosition (Jugador) createVehicle ( 411, x + 2, y, z + 10 ) end function dumpe() Jugador = getLocalPlayer () x,y,z = getElementPosition (Jugador) createVehicle ( 406, x + 2, y, z + 10 ) end function bulle() Jugador = getLocalPlayer () x,y,z = getElementPosition (Jugador) createVehicle ( 541, x + 2, y, z + 10 ) end function Nitro1() triggerServerEvent ( "onNitroo1", getLocalPlayer() ) end function Nitro2() triggerServerEvent ( "onNitroo2", getLocalPlayer() ) end function Nitro3() triggerServerEvent ( "onNitroo3", getLocalPlayer() ) end Presiona "F2" para abrir el panel.
-
Yo te hare este script. Privatizará el vehiculo Infernus para el gang "FBI" . Tu se lo cambias. function privatizar( thePlayer ) if getElementModel( source ) == 411 then if getElementData( thePlayer, "gang" ) == "FBI" then outputChatBox("Bienvenido al auto de FBI", thePlayer, 0, 255, 0, false) else cancelEvent() end end end addEventHandler("onVehicleStartEnter", getRootElement(), privatizar)
-
You're welcome.
-
localPlayer es una variable de client-side.
-
.-. Your video link: We only will use: eji07ISFQWo This part into youtube tag.
-
With this resources you can select spanish or english language. If you select english only who selected english can see your message on the chat. It's the same with spanish. Enjoy it! Resource's link: https://community.multitheftauto.com/index.php?p= ... ls&id=6798
-
gangName not defined. Wrong trigger, it will be triggered to everyone. (infoWindow will open for everyone) Server: function obtenerInfo( source ) local gangName = getElementData( source, "Gang") local infoGang = executeSQLQuery ( "SELECT infoGang FROM gangsName WHERE Nombre = ?", gangName ) triggerClientEvent( "onOpenInfo", source, unpack(infoGang)) end addEvent("onOpen", true) addEventHandler("onOpen", root, obtenerInfo) Client: function abrir3( infoGang ) guiSetVisible(infoWindow, true) guiSetVisible(gangWindow, false) guiSetText(infoMemo, tostring(infoGang)) end addEvent("onOpenInfo", true) addEventHandler("onOpenInfo", root, abrir3) function abrir2(source) triggerServerEvent("onOpen", getLocalPlayer(), getLocalPlayer() ) end When I open the memo appear this: table: 305AD600 Why?
-
Why in the memo appear: "table: 04D24608"? Server: function obtenerInfo(thePlayer) local gang = getElementData(thePlayer, "Gang") local infoGang = executeSQLQuery ( "SELECT infoGang FROM gangsName WHERE Nombre = ?", gangName ) triggerClientEvent("onOpenInfo", getRootElement(), tostring(infoGang)) end addEvent("onOpen", true) addEventHandler("onOpen", root, obtenerInfo) Client: function abrir3(infoGang) guiSetVisible(infoWindow, true) guiSetVisible(gangWindow, false) guiSetText(infoMemo, tostring(infoGang)) end addEvent("onOpenInfo", true) addEventHandler("onOpenInfo", root, abrir3) function abrir2() triggerServerEvent("onOpen", localPlayer, localPlayer) end
-
Como hago para que un boton (guiCreateButton) no este disponible para presionar? No se si me explico. Osea que ni siquiera puedas presionarlo.
-
Try this: -- Client : addEvent ( 'sound', true ) addEventHandler ( 'sound', root, function ( ) if getPedOccupiedVehicle(localPlayer) then local x,y,z = getElementPosition(localPlayer) local song = playSound3D("Diskoparty.mp3", x, y, z, true) attachElements ( sound, localPlayer, 0, 0, 5 ) setSoundVolume ( song, 100 ) setSoundMinDistance ( song, 100 ) outputChatBox(":D") end end ) function stop() stopSound(song) end addEvent('stop', true) addEventHandler('stop', root, stop) -- Server : addEventHandler ( 'onVehicleEnter', resourceRoot, function ( ) triggerClientEvent ( 'sound', source ) end ) addEventHandler( 'onVehicleExit', resourceRoot, function () triggerClientEvent ( 'stop', source) end )
-
Only you should be in team "Criminal" and have a gang.
-
Can I create a gui image without window?
-
Where is "x" defined? local x,y = guiGetScreenSize()
-
Nothing :_ function clickSelect(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) local showing = isCursorShowing () if showing then local x1, y1, wx, wy, wz = getCursorPosition() if x1 == x*0.18671875 and y1 == y*0.401 then removeEventHandler("onClientRender", getLocalPlayer(), draw) outputChatBox("Ha seleccionado el Idioma \"Español\" .", 0, 255, 0, false) showCursor(false) setElementFrozen(localPlayer, false) setElementData( localPlayer, "Idioma", "Español") elseif x1 == x*0.551 and y1 == y*0.401 then removeEventHandler("onClientRender", getLocalPlayer(), draw) outputChatBox("You selected the language \"English\" .", 0, 255, 0, false) showCursor(false) setElementFrozen(localPlayer, false) setElementData( localPlayer, "Idioma", "English") end end end addEventHandler("onClientClick", root, clickSelect) See the dx: function draw() dxDrawRectangle(0, 0, x*1, y*1, tocolor(0, 0, 0, 206), false) dxDrawImage(x*0.18671875, y*0.401, x*0.275, y*0.322, "images/espanol.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*0.551, y*0.401, x*0.275, y*0.322, "images/ingles.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Elige tu idioma / Select your language", x*0.17421875, y*0.0846354166666667, x*0.83984375, y*0.1640625, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) dxDrawText("Español", x*0.2546875, y*0.2994791666666667, x*0.39296875, y*0.3645833333333333, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) dxDrawText("English", x*0.6140625, y*0.2994791666666667, x*0.740625, y*0.3671875, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) end
-
Ahh yes. You are right. Well, I asked you solid about this : function clickSelect(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) local showing = isCursorShowing () if showing then local x1, y1, wx, wy, wz = getCursorPosition() if x1 == 0.18671875 and y1 == 0.401 then removeEventHandler("onClientRender", getLocalPlayer(), draw) showCursor(false) setElementFrozen(localPlayer, false) setElementData( localPlayer, "Idioma", "Español") elseif x1 == 0.551 and y1 == 0.401 then removeEventHandler("onClientRender", getLocalPlayer(), draw) showCursor(false) setElementFrozen(localPlayer, false) setElementData( localPlayer, "Idioma", "English") end end end addEventHandler("onClientClick", root, clickSelect) I tested but dont works.
