-
Posts
101 -
Joined
-
Last visited
Everything posted by carlos eduardo
-
Para ele fazer a segunda só feito a primeira tu pode usar o setElementData para setar a data, depois voce faz uma verificação se o player tem a tal data que tu quer
-
ajuda AJUDA O MAIS RAPIDO POSSIVEL
carlos eduardo replied to CarLoSmAnnOel's topic in Programação em Lua
Na parte de procurar o nick do jogador tem uma função na internet que ja faz isso function findPlayer(name) local matches = {} fir i,v in ipairs(getElementsByType)("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsud("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end não tenho 100% de certeza que ira funcionar, mas esta ai um bom "findPlayer" -
Eu estive pensando, sera que seria melhor um server roleplay estilo do los katchoros do samp, ou freeroam que normalmente tem no mta.
-
Ola galera, queria saber algumas coisas que fariam vcs ficarem no server?Ideias. obs:Não sei se esse é o espaço certo se n for por favor corrija.
-
Favor se poder deixar o script server-side e client-side
- 2 replies
-
- dx
- panellogin
-
(and 3 more)
Tagged with:
-
Acho que da para usar a função getPedOcuppiedVehicle. getPedOcuppiedVehicle EX: function vehicleGodMod(player, thePlayer) if not (hasObjectPermissionTo(player,"general.adminpanel",false)) then outputChatBox("Erro você não tem acesso ao /blindar" ,player,255) return end if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then if theVehicle then setVehicleDamageProof(getPedOccupiedVehicle(player),false) outputChatBox("Você Desblindou Seu Veículo!",player,255) else local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then setVehicleDamageProof(getPedOccupiedVehicle(player),true) outputChatBox("Você Blindou Seu Veículo!",player,0,255) end end addCommandHandler("blindar",vehicleGodMod) addCommandHandler("blindar",vehicleGodMod) obs:não sei tanto de script ent.
-
Valew Unico problema,não tou conseguindo baixar e nem sei como usar o export '-
-
Alguem que saiba mexer com dx pode me ajudar a fazer as coisas igual do guiCreateEdit só que em dx? guiCreateEdit Exemplo:Botar para escrever algo no retangle do dx.
-
Cara eu n testei esse mas testa ae para ver se da certo ----------------------------------------------- ---------------Script made By;[SioN]----------- ----Don't Try To remove or edit the script----- --------------Script version: 1v--------------- ----------------------------------------------- GUIEditor = { button = {}, label = {} } painel = false function painel() wnd = guiCreateWindow(497, 145, 301, 423, "Mudança de clima e tempo", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.97) guiSetProperty(wnd, "CaptionColour", "FF0988F3") showCursor(true) close = guiCreateButton(9, 22, 24, 23, "X", false, wnd) guiSetAlpha(close, 0.80) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "FFFB0000") cloud = guiCreateButton(10, 86, 130, 36, "Muito sem brilho, nebuloso", false, wnd) guiSetAlpha(cloud, 0.80) guiSetFont(cloud, "default-bold-small") guiSetProperty(cloud, "NormalTextColour", "FF243DDA") rain = guiCreateButton(9, 132, 130, 36, "Chuvoso", false, wnd) guiSetAlpha(rain, 0.80) guiSetFont(rain, "default-bold-small") guiSetProperty(rain, "NormalTextColour", "FFEC116E") sun = guiCreateButton(9, 178, 130, 37, "Quente ensolarado", false, wnd) guiSetAlpha(sun, 0.80) guiSetFont(sun, "default-bold-small") guiSetProperty(sun, "NormalTextColour", "FFF4FD00") GUIEditor.label[1] = guiCreateLabel(34, 24, 152, 21, " Fechar Janela ", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 43, 109, 207) bluesky = guiCreateButton(9, 225, 132, 36, "Céu azul claro", false, wnd) guiSetFont(bluesky, "default-bold-small") guiSetProperty(bluesky, "NormalTextColour", "FF09C0F5") sand = guiCreateButton(9, 271, 130, 37, "Tempestade de areia", false, wnd) guiSetFont(sand, "default-bold-small") guiSetProperty(sand, "NormalTextColour", "FFBD8A40") Dull = guiCreateButton(9, 318, 130, 37, "Tempo 0 céu azul", false, wnd) guiSetFont(Dull, "default-bold-small") guiSetProperty(Dull, "NormalTextColour", "FF43D12B") hot = guiCreateButton(9, 365, 130, 37, "Ensolarado, quente escaldante", false, wnd) guiSetFont(hot, "default-bold-small") guiSetProperty(hot, "NormalTextColour", "FFF35B08") morning = guiCreateButton(160, 86, 130, 36, "09:00", false, wnd) guiSetAlpha(morning, 0.80) guiSetFont(morning, "default-bold-small") guiSetProperty(morning, "NormalTextColour", "FF17DBF3") GUIEditor.label[2] = guiCreateLabel(11, 60, 129, 16, "Climas:", false, wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 189, 176, 247) GUIEditor.label[3] = guiCreateLabel(160, 60, 122, 17, "Tempo:", false, wnd) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 189, 176, 247) afternoon = guiCreateButton(160, 132, 130, 36, "12:00", false, wnd) guiSetAlpha(afternoon, 0.80) guiSetFont(afternoon, "default-bold-small") guiSetProperty(afternoon, "NormalTextColour", "FF17DBF3") day = guiCreateButton(160, 179, 130, 36, "15:00", false, wnd) guiSetAlpha(day, 0.80) guiSetFont(day, "default-bold-small") guiSetProperty(day, "NormalTextColour", "FF17DBF3") beforenight = guiCreateButton(160, 225, 130, 36, "18:00", false, wnd) guiSetAlpha(beforenight, 0.80) guiSetFont(beforenight, "default-bold-small") guiSetProperty(beforenight, "NormalTextColour", "FF17DBF3") night = guiCreateButton(160, 272, 130, 36, "22:00", false, wnd) guiSetAlpha(night, 0.80) guiSetFont(night, "default-bold-small") guiSetProperty(night, "NormalTextColour", "FF17DBF3") innight = guiCreateButton(160, 365, 130, 36, "02:00", false, wnd) guiSetAlpha(innight, 0.80) guiSetFont(innight, "default-bold-small") guiSetProperty(innight, "NormalTextColour", "FF17DBF3") minuit = guiCreateButton(160, 319, 130, 36, "00:00", false, wnd) guiSetAlpha(minuit, 0.80) guiSetFont(minuit, "default-bold-small") guiSetProperty(minuit, "NormalTextColour", "FF17DBF3") GUIEditor.label[4] = guiCreateLabel(9, 403, 130, 15, "Script(v1)made by:{Sion}", false, wnd) guiSetAlpha(GUIEditor.label[4], 0.45) guiSetFont(GUIEditor.label[4], "default-small") guiLabelSetColor(GUIEditor.label[4], 154, 146, 146) end --------------------------------------------------------------- ----------------------[Closing The window]--------------------- addEventHandler("onClientGUIClick", root, -- Event function() -- Function if ( source == close ) then -- Chick guiSetVisible ( wnd , false)-- Show Window ( false = Visible! ) showCursor(false) end -- Close( if ) end -- Close Function ) -- Close Event ------------------------------------------------------------ -----------------------[Weathers]--------------------------- function onGuiClick (button, state, absoluteX, absoluteY) if (source == rain) then setWeather ( 16 ) elseif (source == sun) then setWeather ( 11 ) elseif (source == cloud) then setWeather ( 15 ) elseif (source == bluesky) then setWeather (10) elseif (source == sand) then setWeather (19) elseif (source == hot) then setWeather (18) elseif (source == Dull) then setWeather (0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -------------------------------------------------------------------- ----------------------------[Time]---------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) if (source == morning) then setTime( 09, 0 ) elseif (source == afternoon) then setTime( 12, 0 ) elseif (source == day) then setTime( 15, 0 ) elseif (source == beforenight) then setTime (18, 0) elseif (source == night) then setTime (22, 0) elseif (source == innight) then setTime (02, 0) elseif (source == minuit) then setTime (00,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -------------------------------------------------------------------- ----------------------[open the window]----------------------------- Fiz as modificações aqui. bindKey("f7","down", function() if painel == false then addEventHandler("onClientRender",root,painel); showCursor(true); painel = true; else showCursor(false); removeEventHandler("onClientRender",root,painel); painel = false; end end) ------------------------------------------------------------------- Ate aqui.
-
é que eu queria botar nesse painel. https://cdn.discordapp.com/attachments/442730330047250442/442734662624739328/mta-screen_2018-05-06_14-09-13.png OBS:è um painel de teste
-
Estou tentando fazer um script para por cor no carro com um color picker. Queria saber quais as syntaxes para conseguir fazer um tipo esse. http://prntscr.com/jeflct
-
Como remover a hud original e resolver bug chat?
carlos eduardo replied to R1S1NG's topic in Programação em Lua
, -
Vou te chamar para privado para n ficar floodando post.
-
Ja testou o script?Se sim fala oq ta dando no /debugscript 3
-
Ent oque tem q fazer eu acho é só botar para destruir o carro primeiro,e depois da um setElementPosition Um pouco na frente da mark do começo setElementPosition ( source, --O lugar que quer--)
-
Eu acho bom ele fazer um assim. veh = {} markComeco = createMarker(--Ve ali como faz a function e bota dentro desse parenteses--) addEventHandler("onMarkerHit",MarkComeco, function() outputChatBox("#f77ff7Digite /autoc para tirar sua carteira" , player, 255, 255, 255, true) end) addCommandHandler( "autoc" , function (source) if isElementWithinMarker(source, markComeco) then --Aqui em diante vc bota oque vc vai fazer-- end) function sair(source) if(veh[source]) and isElement(veh[source]) then destroyElement (veh[source]) outputChatBox("#000000[#ff0000VDE#000000]#ffffffAchou que eu estava brincando!!!", player, 255, 255, 255, true) setElementPosition ( source, --Posição que você botou la no mark--) else end end addEventHandler("onVehicleExit", getRootElement(), sair) Corrija se tiver algum erro n tenho 100% certeza q esta obs:Por no Server Side
-
Eu ja fiz um script assim acho q esta certo. veh = {} function sair(source) if(veh[source]) and isElement(veh[source]) then destroyElement (veh[source]) setElementPosition ( source, cord) else end end addEventHandler("onVehicleExit", getRootElement(), sair) esse "veh = { }" é o veiculo eu n me lembro como cria a partir dele o lord deve saber.
-
Como setar mark em outra dimensão?
carlos eduardo replied to carlos eduardo's topic in Programação em Lua
ok vlw. -
Queria saber como eu setar a mark q eu criei em outra dimensão. parte do codigo: veh = {} addCommandHandler( "auto" , function (source) if isElementWithinMarker(source, MarkC) then setElementDimension ( source, 5 ) destroyElement(source, MarkC) veh[source] = createVehicle(546, 2415.14673, 89.43729, 26.47131) Mark1 = createMarker(2372.47876, 91.65331, 26.48655, "cylinder",2,255,0,0,180) warpPedIntoVehicle(source, veh[source]) else end end)
-
Queria saber como se faz isso.
carlos eduardo replied to carlos eduardo's topic in Programação em Lua
Vou dormir amanhã eu posso te chamar no pv? -
Queria saber como se faz isso.
carlos eduardo replied to carlos eduardo's topic in Programação em Lua
<meta> <script src="client.lua" type="client" /> <script src="server.lua" type="server" /> </meta> -
Queria saber como se faz isso.
carlos eduardo replied to carlos eduardo's topic in Programação em Lua
nem eu entendo oq ta acontecendo -
Queria saber como se faz isso.
carlos eduardo replied to carlos eduardo's topic in Programação em Lua
o script ta executando tanto que essa parte ta funcionando: function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 220, G or 230, B or 240, alpha or 250), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end MarkC = createMarker(1791.5272216797, -1163.9146728516, 22.928125, "cylinder",2,255,0,0,180) addEventHandler("onClientRender", getRootElement(), function () dxDrawTextOnElement(MarkC,"Colegio",1,20,0,0,255,255,1,"pricedown") end) -
Queria saber como se faz isso.
carlos eduardo replied to carlos eduardo's topic in Programação em Lua
n aparece nada no /debugscript 3 e nem no chat edit:Tou entrando agoran os carro que spawna sozinho