-
Posts
81 -
Joined
-
Last visited
SetMarcos's Achievements
Transformer (11/54)
4
Reputation
-
client.Lua function playmusic() sound = playSound("joinsound.mp3") end function stopmusic() stopSound(sound) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() -- little interval, music is getting laggy when all resources are starting.. setTimer(function() playmusic() end, 2000, 1) end ) function pararsom() stopmusic() end addEvent("pararsom", true) addEventHandler("pararsom", root, pararsom) server.Lua -- root = getElementRoot() addEventHandler("onPlayerLogin", root, function() triggerClientEvent ( source,"pararsom",source) end )
-
Good morning, how can I make the car lights flash when a player tries to catch it? my code: function enterVehicle ( player, seat, jacked ) local lock = getElementData(source, "lockedTo") local accName = getAccountName(getPlayerAccount(player)) if seat == 0 then if accName == lock then setElementFrozen ( source, false ) outputChatBox("[SERVER] - #00ff00your veh!", player, 255, 0, 0,true) return true else local Ax,Ay,Az = getElementPosition (source) cancelEvent() outputChatBox("[SERVER] - #ffff00Veh is private. #808080Owner is:#ff0000 "..lock..".", player, 255, 0, 0,true) triggerClientEvent ( player,"alarmeVeh", player ,source,Ax,Ay,Az) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
-
Good morning, you can leave a marker active only for a specific player, without condition, because it has a job that creates markers for delivery, so it happens that players go in the marks of other players
-
SetMarcos changed their profile photo
-
Good Morning! Can anyone help me how to force the player to make a command on the server side? Example: GUI> Click button> triggerServerEvent> Function Forces player to execute / time command I want to start a function from another resource. If you can help, I am grateful.
-
tenta isso aqui man setElementCollidableWith
-
if commandName then , vai retornar true se vc informar os valores um e dois, caso não seja informado ele retorna false e não entra na condição. tenta assim: function soma(thePlayer, commandName, um, dois) local num1 = tonumber(um) local num2 = tonumber(dois) local resultado = um + dois if commandName then if (num1 and num2) >= 0 then outputChatBox("A soma entre "..num1.. "e "..num2.." é igual a "..resultado..".", thePlayer, 255,255,255, true) end else outputChatBox("Você precisa digitar os dois números para fazer a conta.", thePlayer) end end addCommandHandler("somar", soma)
-
Bom dia! Alguém pode me ajudar a como forçar o player a fazer um comando no lado server? Exemplo: GUI > Click button > triggerServerEvent > Função força o player a executar o comando /time Pretendo iniciar uma função a partir de outro resource. Se puderem ajudar,eu fico grato.
-
[Ajuda] Trocar o personagem CJ pra outro personagem
SetMarcos replied to Paantry's topic in Programação em Lua
https://wiki.multitheftauto.com/wiki/SetElementModel https://wiki.multitheftauto.com/wiki/Character_Skins -
Aprendendo a como montar um gang war
SetMarcos replied to Dasareas's topic in Portuguese / Português
Veja isso -
Version = 1.5.5-release-11815.4.004 Time = Sun Mar 18 09:22:23 2018 Module = C:\Games\GTA\proxy_sa.exe Code = 0xC0000005 Offset = 0x00349B7B EAX=00000000 EBX=0DD462F0 ECX=00000000 EDX=0022FC00 ESI=0DD62558 EDI=00000008 EBP=00000000 ESP=0022FB9C EIP=00749B7B FLG=00010202 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000 How can I fix this? pls
-
Peguei um exemplo na comunidade e modifiquei, e ficou tudo como eu queria. Obrigado a todos pela ajuda.
-
Porque a função não está pegando? Alguém ajude por favor. -- Formato: {x = 0, y = 0, width = 0, height = 0}, local aSavePlaces = { {x = 1587.1513671875, y = -1152.365234375, width = 245, height = 160}, -- BOSS LS {x = 2372.2763671875, y = 1836.701171875, width = 150, height = 160}, -- BOSS LV {x = -2140.8330078125, y = 124.470703125, width = 150, height = 185}, -- BOSS SF } local aRadarAreaPlaces = { {1587.1513, -1152.3652,245, 160,255,0,0,100}, -- BOSS LS {2372.2763, 1836.7011,150, 160,255,0,0,100}, -- BOSS LV {-2140.8330, 124.4707,150, 185,255,0,0,100}, -- BOSS SF } function criandoareas( ) --local display = textCreateDisplay () --local text = textCreateTextItem("Em Zona Segura!", 0.9, 0.7, "high", 0, 255, 0, 255, 2, "right", "bottom") --textDisplayAddText(display, text) for _, a in ipairs( aRadarAreaPlaces ) do pRadarArea = createRadarArea ( unpack( a ) ) setElementData( pRadarArea, "zombieProof", true ) end for _, b in ipairs( aSavePlaces ) do if b then outputChatBox("@b: "..tostring(b)) if b.x and b.y and b.width and b.height then outputChatBox("@b.x: "..tostring(b.x)) outputChatBox("@b.y: "..tostring(b.y)) outputChatBox("@b.width: "..tostring(b.width)) outputChatBox("@b.height: "..tostring(b.height)) zona = createColRectangle (b.x, b.y, b.width, b.height) outputChatBox("@zona: "..tostring(zona)) end end end addEventHandler ( "onColShapeHit", zona , function ( pHitElement ) if getElementType( pHitElement ) == 'player' then --textDisplayAddObserver(display, pHitElement) outputChatBox("@pHitElement: "..tostring(pHitElement)) outputChatBox("[BOSS] - Você entrou em área BOSS.", pHitElement, 0, 145, 0, true) end if getElementData(pHitElement,"zombie") and getElementType( pHitElement ) == 'ped' then killPed(pHitElement) end end ) addEventHandler ( "onColShapeLeave", zona , function (pLeaveElement) if getElementType (pLeaveElement) == 'player' then --textDisplayRemoveObserver(display, pLeaveElement) outputChatBox ("[BOSS] - Você saiu da área BOSS.", pLeaveElement, 145, 0, 0, true) end if getElementData (pLeaveElement, "zombie") and getElementType (pLeaveElement) == 'ped' then killPed (pLeaveElement) end end ) end addEventHandler ( "onResourceStart", resourceRoot,criandoareas) @b: table: 06EDE618 @b.x: 1587.1513671875 @b.y: -1152.365234375 @b.width: 245 @b.height: 160 @zona: userdata: 000010CE ---- @b: table: 06EDE5F0 @b.x: 2372.2763671875 @b.y: 1836.701171875 @b.width: 150 @b.height: 160 @zona: userdata: 000010CF ---- @b: table: 06EDE6B8 @b.x: -2140.8330078125 @b.y: 124.470703125 @b.width: 150 @b.height: 185 @zona: userdata: 000010D0 Sem erros no debugscript 3
-
Obrigado pelas respostas. @#RooTs@Lord Henry