Jump to content

Search the Community

Showing results for tags 'script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. Podem me ajudar com um script que Repara o Veiculo quando você está dentro dele? Não tenho muito conhecimento na area e estava precisando desse Script para o meu servidor Preciso que a pessoa que tenha essa tag determinada , de mecanico por exemplo , conseguisse reparar o veiculo dando /repararveiculo , por exemplo POR FAVOR , ME AJUDEM!
  2. Queria que quando o player coilidisse com o ultimo marker do objetivo, setasse um frozen nele junto da setTimer do fim3, para que eles não buguem e dupliquem ou tripliquem o givePlayerMoney, se poderem me dar umas explicações como sempre ksks destinos = { [1] = {1905.856, -1117.615, 25.664}, -- table com todos os destinos em ordem. [2] = {1496.891, -691.943, 94.75}, [3] = {1684.788, -2101.417, 13.834} } local Minicio3 = createMarker (2104.386, -1806.494, 12.6, "cylinder", 1, 16, 102, 231, 50) -- Cria o marker onde o player deve usar o comando. local veh = {} -- Cada elemento específico de cada jogador deve estar em uma table para ser criado e acessado corretamente. local Mfim3 = {} -- Marker final específico do player. local Bfim3 = {} -- Blip do marker final específico do player. local sourceAccount = getPlayerAccount ( source ) function inicio3 (source) if source and getElementType (source) == "player" and not getPedOccupiedVehicle (source) then -- Quando o jogador colide no marker e está sem veículo, então: outputChatBox ("#1066E7──────────────── Trabalho BvP™ ────────────────",source,255,255,255,true) -- Avisa pra ele usar o comando /trampo4 para começar o emprego. outputChatBox ("#FF0000Trabalho de Entregador de Pizzas #FFFFFF→ Neste trabalho você terá que entregar as Pizzas até aos destinos no radar. Sua recompensa é de R$2000.",source,255,255,255,true) outputChatBox (" ",source,255,255,255,true) outputChatBox ("* Digite #FF0000/emprego3 #FFFFFFpara aceitar o trabalho.",source,255,255,255,true) outputChatBox ("#1066E7───────────────────────────────────────────",source,255,255,255,true) end end addEventHandler ("onMarkerHit", Minicio3, inicio3) function startJob3 (thePlayer, cmd) if isElementWithinMarker (thePlayer, Minicio3) and not getPedOccupiedVehicle (thePlayer) then -- Ao usar o comando, só funciona se o jogador estiver no marker e estiver sem veículo. if veh[thePlayer] and isElement (veh[thePlayer]) then -- Se por acaso existir o veículo do trampo do jogador, destroi ele. destroyElement (veh[thePlayer]) veh[thePlayer] = nil end veh[thePlayer] = createVehicle (468, 2095.678, -1796.701, 13.383) -- Cria o veículo do trampo. local x, y, z = unpack (destinos[1]) -- x, y, z recebem as coordenadas do destinos[1]. Mfim3[thePlayer] = createMarker (x, y, z, "cylinder", 2, 0, 255, 0, 255, thePlayer) -- Cria o marker do objetivo do jogador na coordenada 1. setElementData (Mfim3[thePlayer], "owner", thePlayer) -- Seta esse jogador como dono do marker, para que só funcione com ele. setElementData (Mfim3[thePlayer], "trip", 1) -- Seta uma data no marker pra saber a qual coordenada ele pertence. Bfim3[thePlayer] = createBlipAttachedTo (Mfim3[thePlayer], 19) -- Cria o blip e anexa ao marker. warpPedIntoVehicle (thePlayer, veh[thePlayer]) -- Teleporta o player para o veículo do trampo. setPedSkin ( thePlayer, 20 ) dxMsg(thePlayer, "Leve as Pizzas ate a bandeira no radar! (1/"..#destinos..")!", "info") -- Avisa o player o que ele tem que fazer agora. addEventHandler ("onMarkerHit", Mfim3[thePlayer], fim3) -- Adiciona o evento que faz funcionar o marker do objetivo. end end addCommandHandler ("emprego3", startJob3) function fim3 (hitElement) if (hitElement == getElementData (source, "owner")) then -- Se o elemento que colidiu for o dono do marker, então: if veh[hitElement] and isElement(veh[hitElement]) then -- Se existe o veículo do trampo do jogador, então: if (getElementData (source, "trip") < #destinos) then -- Se a data do marker é menor que a quantidade de destinos, então: (indicando que não é a última viagem) local x, y, z = unpack (destinos[getElementData (source, "trip") + 1]) -- x, y, z recebem a próxima coordenada da table destinos. setElementPosition (source, x, y, z) -- Coloca o marker de objetivo nessa nova coordenada. setElementData (source, "trip", getElementData (source, "trip") + 1) -- Seta a nova viagem nesse marker. dxMsg(hitElement, "Você entregou as Pizzas no destino. Siga para o próximo. ("..getElementData (source, "trip").."/"..#destinos..")", "info") -- Avisa o jogador quantas viagens ele fez e quantas são no total, pra ele não pensar que está trabalhando de graça. else -- Se o marker de objetivo colidido não tem data menor que a quantidade de viagens, então: (indicando que esse é o último objetivo) dxMsg(hitElement, "Recebendo Pagamento...", "info") setTimer(function(hitElement) removeEventHandler ("onMarkerHit", Mfim3[hitElement], fim3) -- Remove o evento que ativa este marker, pois ele não será mais usado. destroyElement (veh[hitElement]) -- Destroi o veículo do trampo do jogador. givePlayerMoney (hitElement, 2000) -- Dá o dinheiro do trampo. if isElement(Bfim3[hitElement]) then destroyElement (Bfim3[hitElement]) end -- Destroi o blip anexado ao marker de objetivo. Bfim3[hitElement] = nil if isElement(Mfim3[hitElement]) then destroyElement (Mfim3[hitElement]) end -- Destroi o marker de objetivo. Mfim3[hitElement] = nil dxMsg(hitElement, "Pagamento recebido (R$ 2000)!", "sucess") -- Avisa o jogador que ele completou o trampo. end, 5000, 1,hitElement) end end end end function sair3 (thePlayer) if (veh[thePlayer]) and isElement(veh[thePlayer]) then -- Se o veículo do trampo existe, então: removeEventHandler ("onMarkerHit", Mfim3[thePlayer], fim3) -- Remove o evento que ativa o marker de objetivo. destroyElement (veh[thePlayer]) -- Destroi o veículo do trampo. destroyElement (Bfim3[thePlayer]) -- Destroi o blip de objetivo do trampo. Bfim3[thePlayer] = nil destroyElement (Mfim3[thePlayer]) -- Destroi o marker de objetivo do trampo. Mfim3[thePlayer] = nil dxMsg(thePlayer, "Você abandonou a moto e perdeu o trabalho seu bastardo!", "error") -- Avisa o jogador que ele falhou no trampo. end end addEventHandler ("onVehicleExit", getRootElement(), sair3) -- Executa essa função quando o player sair de um veículo qualquer. function quit3 () if isElement(Bfim3[source]) then destroyElement (Bfim3[source]) end if isElement(Mfim3[source]) then destroyElement (Mfim3[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim3[source] = nil Mfim3[source] = nil veh[source] = nil end addEventHandler("onPlayerQuit", getRootElement(), quit3) function kill3 () if isElement(Bfim3[source]) then destroyElement (Bfim3[source]) end if isElement(Mfim3[source]) then destroyElement (Mfim3[source]) dxMsg(source, "Você se matou e perdeu o trabalho seu imbecil!", "error") end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim3[source] = nil Mfim3[source] = nil veh[source] = nil end addEventHandler("onPlayerWasted", getRootElement(), kill3) function logout3 () if isElement(Bfim3[source]) then destroyElement (Bfim3[source]) end if isElement(Mfim3[source]) then destroyElement (Mfim3[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim3[source] = nil Mfim3[source] = nil veh[source] = nil end addEventHandler("onPlayerLogout", getRootElement(), logout) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end
  3. Client.lua: function processLockUnlock(vehicle) if vehicle then local vehicleID = tonumber(getElementData(vehicle, "veh:id")) or -1 local vehFaction = tonumber(getElementData(vehicle, "veh:faction")) or 0 local vehOwner = tonumber(getElementData(vehicle, "veh:owner")) or -1 local vehJobID = tonumber(getElementData(vehicle, "veh:jobvehID")) or -1 local locked = isVehicleLocked(vehicle) local vehID = getElementModel(vehicle) local vehName = getVehicleRealName(vehID) if isPedInVehicle(localPlayer) then playSounds("lockin") else playSounds("lockout") end if locked then triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, false) else triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, true) end else outputChatBox("#FFFFFF Nincs kulcsod ehhez a járműhöz.", 169,139,101, true) end end local klikkTimer = false function setVehicleLockState() if klikkTimer then return end if isTimer(klikkTimerRun) then return end klikkTimer = true klikkTimerRun = setTimer(function() klikkTimer = false end,1000,1) local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle then processLockUnlock(vehicle) else local int2 = getElementInterior(localPlayer) local dim2 = getElementDimension(localPlayer) local mx,my,mz = getElementPosition(localPlayer) local interior = getElementData(localPlayer, "interior") or false if not interior then for k,v in ipairs(getElementsByType("vehicle")) do local x,y,z = getElementPosition(v) local int = getElementInterior(v) local dim = getElementDimension(v) local dist = getDistanceBetweenPoints3D(x,y,z,mx,my,mz) if dist <= 3 and int2 == int and dim2 == dim then processLockUnlock(v) return end end end end end bindKey("k", "down", setVehicleLockState) setTimer(function() if not bindKey("k", "down", setVehicleLockState) then bindKey("k", "down", setVehicleLockState) end end, 1000, 0) Server.lua: addEvent("vehicleLock",true) addEventHandler("vehicleLock",getRootElement(),function(player,veh,value) setVehicleLocked(veh, value) veh:setData("veh:status", value) end) No errors / warnings in debugscript... if i press the [K] button, nothing happens... what wrong in this code? how to fix?
  4. Bom eu estava fazendo um script de entregador de pizza so que ele deu este erro SCRIPT ERROR: [managers]\Entregado-de-pizza\server.lua:45: unexpected symbol near ']' ERROR: Loading script failed: [managers]\Entregado-de-pizza\server.lua:45: unexpected symbol near ']' Tentei de tudo mais não consegui e resolvi pedir ajuda aqui Script : Inicio = createMarker (2097.1354980469, -1799.8197021484, 13.3828125 -1, "cylinder", 2, 255, 0, 0, 255) Final = createMarker (2803.4304199219, -1177.8922119141, 25.520080566406 -1, "cylinder", 2, 255, 0, 0, 255) Final = createBlipAttachedTo ( Final, 19 ) setElementVisibleTo ( Final, root, false ) veh = {} function inici (source) if isElementWithinMarker(source, Inicio) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Trabalho = true veh[source] = createVehicle(448,2113.3620605469, -1782.1077880859, 13.388433456421) setElementVisibleTo ( Final, source, true ) warpPedIntoVehicle ( source, veh[source] ) outputChatBox ("#0000FF==============================================================================",source,0,0,0,true ) outputChatBox ("#FFD700[#FFFF00Info#FFD700]#FFFF00Entregue as pizzas ate a bandeira vermelha",source,0,0,0,true ) outputChatBox ("#FFD700[#FFFF00Tutorial#FFD700]#FFFF00Para saber onde fica essa bandeira vermelha aperte F11 ",source,0,0,0,true ) outputChatBox ("#0000FF==============================================================================",source,0,0,0,true ) end end addEventHandler( "onMarkerHit", Inicio, inici ) function fim (source) if veh[source] and isElement(veh[source]) then destroyElement (veh[source]) givePlayerMoney(source,2000) setElementVisibleTo ( Final, source, false ) outputChatBox("#FFFF00[#FFD700Info#FFFF00]#FFD700Você concluiu sua entrega e recebeu 2000 reais",source,0,0,0,true) else end end addEventHandler("onMarkerHit",Final ,fim) function sair (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( Final, source, false ) destroyElement (veh[source]) outputChatBox("#FFD700[#FFFF00Info#FFD700]#FF0000Você saiu do veiculo e perdeu o emprego",source ,0,0,0,true ) else end end addEventHandler( "onVehicleExit", getRootElement[], sair )
  5. queria que assim q ele pegasse o trabalho, ele ter de ir buscar os passageiros no marker 1 da table, e depois ter de leva-los ao marker 2 da table. coloquei umas anims neles para eles irem andando em direçao ao avião, se algo estiver errado, se poderem corrigir e me falar oque errei eu agradeço, boa noite e feliz natal ae pra vcs. destinos = { [1] = {1612.7482910156, -2480.7473144531, 13.5546875}, -- table com todos os destinos em ordem. [2] = {-1487.8798828125, -108.69385528564, 14.1484375} } local Minicio7 = createMarker (1714.3579101563, 1615.6630859375, 9.2, "cylinder", 1, 16, 102, 231, 50) -- Cria o marker onde o player deve usar o comando. local veh = {} -- Cada elemento específico de cada jogador deve estar em uma table para ser criado e acessado corretamente. local Mfim7 = {} -- Marker final específico do player. local Bfim7 = {} -- Blip do marker final específico do player. function inicio7 (source) if source and getElementType (source) == "player" and not getPedOccupiedVehicle (source) then -- Quando o jogador colide no marker e está sem veículo, então: outputChatBox ("#1066E7──────────────── Trabalho BvP™ ────────────────",source,255,255,255,true) -- Avisa pra ele usar o comando /trampo4 para começar o emprego. outputChatBox ("#FF0000Trabalho de Piloto de Avião #FFFFFF→ Neste trabalho você terá de levar os passageiros até a marcação no radar. Sua recompensa é de R$8000.",source,255,255,255,true) outputChatBox (" ",source,255,255,255,true) outputChatBox ("* Digite #FF0000/emprego7 #FFFFFFpara aceitar o trabalho.",source,255,255,255,true) outputChatBox ("#1066E7───────────────────────────────────────────",source,255,255,255,true) end end addEventHandler ("onMarkerHit", Minicio7, inicio7) function startJob7 (thePlayer, cmd) if isElementWithinMarker (thePlayer, Minicio7) and not getPedOccupiedVehicle (thePlayer) then -- Ao usar o comando, só funciona se o jogador estiver no marker e estiver sem veículo. if veh[thePlayer] and isElement (veh[thePlayer]) then -- Se por acaso existir o veículo do trampo do jogador, destroi ele. destroyElement (veh[thePlayer]) veh[thePlayer] = nil end veh[thePlayer] = createVehicle (577, 1443.5461425781, 1459.3911132813, 10.8203125) -- Cria o veículo do trampo. local x, y, z = unpack (destinos[1]) -- x, y, z recebem as coordenadas do destinos[1]. Mfim7[thePlayer] = createMarker (x, y, z, "cylinder", 2, 0, 255, 0, 255, thePlayer) -- Cria o marker do objetivo do jogador na coordenada 1. setElementData (Mfim7[thePlayer], "owner", thePlayer) -- Seta esse jogador como dono do marker, para que só funcione com ele. setElementData (Mfim7[thePlayer], "trip", 1) -- Seta uma data no marker pra saber a qual coordenada ele pertence. Bfim7[thePlayer] = createBlipAttachedTo (Mfim7[thePlayer], 19) -- Cria o blip e anexa ao marker. warpPedIntoVehicle (thePlayer, veh[thePlayer]) -- Teleporta o player para o veículo do trampo. setPedSkin ( thePlayer, 72 ) dxMsg(thePlayer, "Vá buscar os passageiros.", "info") ped1 = createPed ( 1, 1591.1002197266,-2462.6525878906,13.5546875 ) setPedRotation(ped1, 181) ped2 = createPed ( 7, 1591.2203369141,-2459.6557617188,13.5546875 ) setPedRotation(ped2, 181) ped3 = createPed ( 15, 1591.1318359375,-2456.8723144531,13.5546875 ) setPedRotation(ped3, 181) dxMsg(thePlayer, "Os Passageiros estão entrando no avião aguarde...", "info") setPedAnimation( ped1, "ped", "WOMAN_walknorm") setPedAnimation( ped2, "ped", "WOMAN_walknorm") setPedAnimation( ped3, "ped", "WOMAN_walknorm") setTimer(function(thePlayer) destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) dxMsg(thePlayer, "Os Passageiros entraram no avião, Leve-os até o aeropoto marcado no radar.", "info") -- Avisa o player o que ele tem que fazer agora. addEventHandler ("onMarkerHit", Mfim7[thePlayer], fim7) -- Adiciona o evento que faz funcionar o marker do objetivo. end, 7000, 1,thePlayer) end end addCommandHandler ("emprego7", startJob7) function fim7 (hitElement) if (hitElement == getElementData (source, "owner")) then -- Se o elemento que colidiu for o dono do marker, então: if veh[hitElement] and isElement(veh[hitElement]) then -- Se existe o veículo do trampo do jogador, então: if (getElementData (source, "trip") < #destinos) then -- Se a data do marker é menor que a quantidade de destinos, então: (indicando que não é a última viagem) local x, y, z = unpack (destinos[getElementData (source, "trip") + 1]) -- x, y, z recebem a próxima coordenada da table destinos. setElementPosition (source, x, y, z) -- Coloca o marker de objetivo nessa nova coordenada. setElementData (source, "trip", getElementData (source, "trip") + 1) -- Seta a nova viagem nesse marker. dxMsg(hitElement, "Você entregou os passageiros no local, Agora Volte com o avião para o aeroporto raiz marcado no radar!", "info") -- Avisa o jogador quantas viagens ele fez e quantas são no total, pra ele não pensar que está trabalhando de graça. else -- Se o marker de objetivo colidido não tem data menor que a quantidade de viagens, então: (indicando que esse é o último objetivo) dxMsg(hitElement, "Recebendo Pagamento...", "info") setTimer(function(hitElement) removeEventHandler ("onMarkerHit", Mfim7[hitElement], fim7) -- Remove o evento que ativa este marker, pois ele não será mais usado. destroyElement (veh[hitElement]) -- Destroi o veículo do trampo do jogador. givePlayerMoney (hitElement, 8000) -- Dá o dinheiro do trampo. if isElement(Bfim7[hitElement]) then destroyElement (Bfim7[hitElement]) end -- Destroi o blip anexado ao marker de objetivo. Bfim7[hitElement] = nil if isElement(Mfim7[hitElement]) then destroyElement (Mfim7[hitElement]) end -- Destroi o marker de objetivo. Mfim7[hitElement] = nil dxMsg(hitElement, "Pagamento recebido (R$ 8000)!", "sucess") -- Avisa o jogador que ele completou o trampo. end, 5000, 1,hitElement) end end end end function sair7 (thePlayer) if (veh[thePlayer]) and isElement(veh[thePlayer]) then -- Se o veículo do trampo existe, então: removeEventHandler ("onMarkerHit", Mfim7[thePlayer], fim7) -- Remove o evento que ativa o marker de objetivo. destroyElement (veh[thePlayer]) -- Destroi o veículo do trampo. destroyElement (Bfim7[thePlayer]) -- Destroi o blip de objetivo do trampo. Bfim7[thePlayer] = nil destroyElement (Mfim7[thePlayer]) -- Destroi o marker de objetivo do trampo. Mfim7[thePlayer] = nil dxMsg(thePlayer, "Você abandonou os passageiros e perdeu o trabalho idiota!", "error") -- Avisa o jogador que ele falhou no trampo. end end addEventHandler ("onVehicleExit", getRootElement(), sair7) -- Executa essa função quando o player sair de um veículo qualquer. function quit7 () if isElement(Bfim7[source]) then destroyElement (Bfim7[source]) end if isElement(Mfim7[source]) then destroyElement (Mfim7[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim7[source] = nil Mfim7[source] = nil veh[source] = nil destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) end addEventHandler("onPlayerQuit", getRootElement(), quit7) function kill7 () if isElement(Bfim7[source]) then destroyElement (Bfim7[source]) end if isElement(Mfim7[source]) then destroyElement (Mfim7[source]) dxMsg(source, "Você se matou e perdeu o trabalho seu imbecil!", "error") end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim7[source] = nil Mfim7[source] = nil veh[source] = nil destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) end addEventHandler("onPlayerWasted", getRootElement(), kill7) function logout7 () if isElement(Bfim7[source]) then destroyElement (Bfim7[source]) end if isElement(Mfim7[source]) then destroyElement (Mfim7[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim7[source] = nil Mfim7[source] = nil veh[source] = nil destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) end addEventHandler("onPlayerLogout", getRootElement(), logout7) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end Voces são uma segunda familia pra mim
  6. Tou criando um Serve de gamemode PUBG, tá ficando legalzinho, mas preciso de alguns Script de MIRA 2x, 4x, 8; Squad; e ETC... Quem puder me ajudar serei muito grato!!
  7. here's a video about the bug..: How to fix this bug? I tried many things, but unsuccessfully.. :s Here the code: Client.lua: local sX, sY = guiGetScreenSize() setElementData(localPlayer,"name",nil) GUIEditor = { button = {}, edit = {} } GUIEditor.button[1] = guiCreateButton(0.72, 0.74, 0.03, 0.04, ">", true) kuldottpmek = {} fogadottpmek = {} GUIEditor.edit[1] = guiCreateEdit(0.38, 0.74, 0.34, 0.04, ".", true) guiEditSetMaxLength(GUIEditor.edit[1], 150) local dxfont0_gothic = dxCreateFont(":mta_wintertime/gothic.ttf", 14) local screenW, screenH = guiGetScreenSize() local players = getElementsByType ( "player" ) addEventHandler("onClientRender", root, function() local players = getElementsByType ( "player" ) local elem = 0 local fpm = 0 local kpm = 0 local uzenet = guiGetText(GUIEditor.edit[1]) dxDrawRectangle(screenW * 0.3722, screenH * 0.2722, screenW * 0.3833, screenH * 0.5100, tocolor(0, 0, 0, 162), false) dxDrawRectangle(screenW * 0.1757, screenH * 0.2722, screenW * 0.1896, screenH * 0.5100, tocolor(0, 0, 0, 162), false) dxDrawText("Játékoslista", screenW * 0.1764, screenH * 0.2722, screenW * 0.3653, screenH * 0.3167, tocolor(255, 255, 255, 255), 1.00, dxfont0_gothic, "center", "center", false, false, false, false, false) for id,player in ipairs(players) do local plname = getPlayerName(player) elem = elem + 1 dxDrawText(plname, screenW * 0.1764, screenH * 0.2500+(elem*70), screenW * 0.3653, screenH * 0.3578, tocolor(255, 255, 255, 255), 0.65, dxfont0_gothic, "left", "center", false, false, true, true, false) dxDrawRectangle(screenW * 0.1764, screenH * 0.2850+(elem*35), screenW * 0.1889, screenH * 0.0367, tocolor(0, 0, 0, 162), false) end dxDrawText(getElementData(localPlayer,"name") or "Válassz játékost", screenW * 0.3722, screenH * 0.2722, screenW * 0.7556, screenH * 0.3167, tocolor(255, 255, 255, 255), 1.00, dxfont0_gothic, "center", "center", false, false, false, true, false) dxDrawText(getElementData(localPlayer,"name") and "Elérhető most" or "", screenW * 0.5278, screenH * 0.3056, screenW * 0.6014, screenH * 0.3411, tocolor(255, 255, 255, 255), 0.65, dxfont0_gothic, "center", "center", false, false, false, true, false) dxDrawRectangle(screenW * 0.3722, screenH * 0.3467, screenW * 0.3833, screenH * 0.3844, tocolor(0, 0, 0, 162), false) for k,v in ipairs(kuldottpmek) do kpm = kpm + 1 dxDrawRectangle(screenW * 0.3722, screenH * 0.2775+(kpm*62), screenW * 0.3833, screenH * 0.0633, tocolor(94, 192, 254, 162), false) dxDrawText("Te:", screenW * 0.3729, screenH * 0.1430+(kpm*124), screenW * 0.7556, screenH * 0.4367, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, false, true, false) dxDrawText(v, screenW * 0.3729, screenH * 0.3050+(kpm*62), screenW * 0.7556, screenH * 0.4733, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, true, true, false, false) for k,v in ipairs(fogadottpmek) do kpm = kpm + 1 dxDrawRectangle(screenW * 0.3722, screenH * 0.2775+(kpm*62), screenW * 0.3833, screenH * 0.0633, tocolor(255, 255, 254, 162), false) dxDrawText(getElementData(localPlayer,"name")..":", screenW * 0.3729, screenH * 0.1430+(kpm*124), screenW * 0.7556, screenH * 0.4367, tocolor(110, 110,111, 200), 1.00, "default-bold", "left", "center", false, false, false, true, false) dxDrawText(v, screenW * 0.3729, screenH * 0.3050+(kpm*62), screenW * 0.7556, screenH * 0.4733, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, true, true, false, false) end end end ) function onClientClick(button, state) local elem = 0 if button == "left" and state == "down" then for k, v in ipairs(players) do local plname = getPlayerName(v) elem = elem+1 if isInBox(screenW * 0.1764, screenH * 0.2850+(elem*35), screenW * 0.1889, screenH * 0.0367) then if plname == getPlayerName(localPlayer) then return end setElementData(localPlayer,"name",plname) kuldottpmek = {} fogadottpmek = {} end end end end addEventHandler("onClientClick", root, onClientClick) function isInBox(xS,yS,wS,hS) if(isCursorShowing()) then local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*sX, cursorY*sY if(cursorX >= xS and cursorX <= xS+wS and cursorY >= yS and cursorY <= yS+hS) then return true else return false end end end function trig1() if getElementData(localPlayer,"name") == nil then return end local nev =getElementData(localPlayer,"name") or "" local targetPlayer = getPlayerFromName ( nev ) if targetPlayer then local uzenet = guiGetText(GUIEditor.edit[1]) table.insert(kuldottpmek,uzenet) end end addEvent("uzenet",true) addEventHandler("uzenet",root,trig1) function trig2() if getElementData(localPlayer,"name") == nil then return end local nev =getElementData(localPlayer,"name") or "" local targetPlayer = getPlayerFromName ( nev ) if targetPlayer then local uzenet = guiGetText(GUIEditor.edit[1]) table.insert(fogadottpmek,uzenet) end end addEvent("uzenet2",true) addEventHandler("uzenet2",root,trig2) function test() if getElementData(localPlayer,"name") == nil then return end local uzenet = guiGetText(GUIEditor.edit[1]) triggerServerEvent("pmuzenet",localPlayer,getLocalPlayer(),uzenet) end addEventHandler("onClientGUIClick",GUIEditor.button[1],test,false) Server.lua: function privateMessage(thePlayer) local sendToName = getElementData(thePlayer,"name") local toPlayer = getPlayerFromParticalName (sendToName) triggerClientEvent(thePlayer,"uzenet",toPlayer) triggerClientEvent(toPlayer,"uzenet2",thePlayer) setElementData(toPlayer,"fogadott",true) setElementData(thePlayer,"fogadott",false) end addEvent("pmuzenet",true) addEventHandler("pmuzenet",root,privateMessage) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
  8. Hello to everyone. My name is Jahseh, i need a developer for my MTA french roleplay server. I can speak french and english. The goal is to make me some "job script" or anything else do make it more original than others servers or repair some script than doesn't work well. You will send the script to me or showing me your experiences on scripting and you will get paid. It depends on what you gonna do on my server, we will talk about money together. If you are interested email me : [email protected] Or just come on my teamspeak : horizonroleplay.ts3serv.com I don't have many experiences on scripting, i can just modify a little bit but i already got a gamemode translated in french and fully playable ! Thanks a lot ! See you soon ?
  9. Alguém pode me ajudar com um script? eu consegui criar um veiculo para a acl "admin" através do comando "carro". Porém não consigo fazer para que respawne apenas um carro por vez. Toda vez que digita o comando "carro" ele continua spawnando o veiculo um do lado do outro. function veiculodayz(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then do local x, y, z = getElementPosition(thePlayer) veh = createVehicle(489, x+3, y, z) setVehicleColor(veh,0,0,0) vehCol = createColSphere(x, y, z, 2.5) attachElements( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"Tire_inVehicle",4) setElementData(vehCol,"Engine_inVehicle",1) setElementData(vehCol,"Parts_inVehicle",1) setElementData(vehCol,"fuel",10000) end end end addCommandHandler("carro", veiculodayz)
  10. I want create a dx private message system, like the fb messenger.. But how to make it possible? Or where can i download a script like this? sorry for my bad english..
  11. function asdasdsas() playSound("http://www.convertmp3.io/fetch/?video=https://www.youtube.com/watch?v=iq7q82Cd6RI") end addCommandHandler("test",asdasdsas) what wrong? the API working fine, but the playSound not.. how to fix?
  12. Hello guys! I started with shaders today, I made a script to apply a texture to the weapons fire, but it is not working, nor does it give any error in the debug. Client-side shader = dxCreateShader("shader/shader.fx") fire_fx = dxCreateTexture("files/fire.png") function replaceFireFX() engineApplyShaderToWorldTexture(shader, "muzzle_texture4") dxSetShaderValue(shader, "gTexture", fire_fx) end addEventHandler("onClientResourceStart", resourceRoot, replaceFireFX) addEventHandler("onClientPlayerJoin", root, replaceFireFX) FX-Code texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } } fire.png
  13. So i have a shop script wich pretty much allows to buy items/weapons from this shop, the shop sells with "K.B.K Points" which is the player money but with another name to fit the server. The problem i have is when player buys one of the item they get all of them. I want to make them get the item they buy ONLY and get the right amount, for example if you buy a MK 48 Mod 0 Mag, you should get 100x of this item in your inventory because the mag itself is 100, otherwise wich ive tested it only gave 1x. But the problem is when i add more lines which i have shown below, it gives the player all the items listed below, i was trying to use if, and else if, but because i lack experience in lua coding i was not able to debug this even with debugscript! I would appreciate if someone could work out or help me out on how to make the shop only give the player the item the player buys and the right amount! The "+1" in the lists are the amount the player should get! If you need more of the code to understand and help me out then i will add it on request local items = { --items,cena(K.B.K Points) {"M1911",50}, {"PDW",150}, {"Winchester 1866",150}, {"AK-107",300}, {"M4A1 Holo",300}, {"MK 48 Mod 0",450}, {"CZ550",300}, {"DMR",400}, {"M1911 Mag",50}, {"PDW Mag",100}, {"1866 Slug",125}, {"AK-107 Mag",100}, {"M4A1 Holo Mag",50}, {"MK 48 Mod 0 Mag",200}, {"CZ550 Mag",50}, {"DMR Mag",25}, {"Medic Kit",50}, {"Painkiller",10}, {"Morphine",10}, {"Bandage",5}, {"Water Bottle",15}, {"Burger",15}, {"Tire",75}, {"Engine",125}, {"Tank Parts",50}, {"Camouflage Clothing",100}, {"Army Clothing",150}, {"Ghost Clothing",200}, {"K.B.K Backpack",150}, {"Ghillie Suit",200}, {"Civilian Clothing",30}, {"GPS",15}, {"Map",15}, {"Toolbox",25}, } SHOP = { button = {}, window = {}, gridlist = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() SHOP.window[1] = guiCreateWindow(0.17, 0.23, 0.65, 0.55, "Kill Or Be Killed Shop", true) guiWindowSetMovable(SHOP.window[1], false) guiWindowSetSizable(SHOP.window[1], false) guiSetProperty(SHOP.window[1], "CaptionColour", "FF075205") SHOP.gridlist[1] = guiCreateGridList(0.01, 0.06, 0.97, 0.63, true, SHOP.window[1]) column = guiGridListAddColumn(SHOP.gridlist[1], "Item", 0.5) column2 =guiGridListAddColumn(SHOP.gridlist[1], "K.B.K Points", 0.5) for _, v in ipairs(items) do local row = guiGridListAddRow ( SHOP.gridlist[1] ) guiGridListSetItemText ( SHOP.gridlist[1], row, column, v[1], false, false ) guiGridListSetItemText ( SHOP.gridlist[1], row, column2, v[2].."", false, false ) end guiSetProperty(SHOP.gridlist[1], "SortSettingEnabled", "False") SHOP.label[1] = guiCreateLabel(0.02, 0.69, 0.97, 0.08, "Select item which you want to buy! \nThe shop value is K.B.K Points", true, SHOP.window[1]) guiLabelSetColor( SHOP.label[1],255,255,255) guiSetFont(SHOP.label[1], "default-bold-small") guiLabelSetHorizontalAlign(SHOP.label[1], "center", true) guiLabelSetVerticalAlign(SHOP.label[1], "center") SHOP.button[1] = guiCreateButton(0.35, 0.79, 0.30, 0.12, "BUY", true, SHOP.window[1]) guiSetFont(SHOP.button[1], "default-bold-small") guiSetVisible ( SHOP.window[1], false ) addEventHandler ( "onClientGUIClick", SHOP.gridlist[1], click ) addEventHandler ( "onClientGUIClick", SHOP.button[1], buttonClick ) end ) bindKey ( "f4", "down", function ( ) if getElementData(localPlayer, "logedin") then -- if getElementData (getLocalPlayer(),"playerlevel") >= 3 then local state = ( not guiGetVisible (SHOP.window[1]) ) guiSetVisible ( SHOP.window[1], state ) showCursor ( state ) -- else -- outputChatBox (" 3!") -- end end end ) function buttonClick(button) if getElementData(localPlayer, "logedin") then if button == "left" then local nRow, nColumn = guiGridListGetSelectedItem( SHOP.gridlist[1] ) if nRow ~= -1 and nColumn ~= - 1 then local selectedItem = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 1 ) local price = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 2 ) local money = getPlayerMoney(thePlayer) if (money) >= tonumber(price) then guiLabelSetColor( SHOP.label[1],255,255,255) -- guiSetText( SHOP.label[1],"pietiek nauda") setPlayerMoney(money -tonumber(price)) setElementData(getLocalPlayer(),"PDW",getElementData(getLocalPlayer(),"PDW")+1) setElementData(getLocalPlayer(),"Winchester 1866",getElementData(getLocalPlayer(),"Winchester 1866")+1) setElementData(getLocalPlayer(),"M1911",getElementData(getLocalPlayer(),"M1911")+1) setElementData(getLocalPlayer(),"AK-107",getElementData(getLocalPlayer(),"AK-107")+1) setElementData(getLocalPlayer(),"M4A1 Holo",getElementData(getLocalPlayer(),"M4A1 Holo")+1) setElementData(getLocalPlayer(),"DMR",getElementData(getLocalPlayer(),"DMR")+1) setElementData(getLocalPlayer(),"CZ550",getElementData(getLocalPlayer(),"CZ550")+1) setElementData(getLocalPlayer(),"MK 48 Mod 0",getElementData(getLocalPlayer(),"MK 48 Mod 0")+1) setElementData(getLocalPlayer(),"M4A1 Holo Mag",getElementData(getLocalPlayer(),"M4A1 Holo Mag")+20) setElementData(getLocalPlayer(),"DMR Mag",getElementData(getLocalPlayer(),"DMR Mag")+5) setElementData(getLocalPlayer(),"CZ550 Mag",getElementData(getLocalPlayer(),"CZ550 Mag")+10) setElementData(getLocalPlayer(),"M1911 Mag",getElementData(getLocalPlayer(),"M1911 Mag")+100) setElementData(getLocalPlayer(),"PDW Mag",getElementData(getLocalPlayer(),"PDW Mag")+10) setElementData(getLocalPlayer(),"1866 Slug",getElementData(getLocalPlayer(),"1866 Slug")+7) setElementData(getLocalPlayer(),"MK 48 Mod 0 Mag",getElementData(getLocalPlayer(),"MK 48 Mod 0 Mag")+100) setElementData(getLocalPlayer(),"Medic Kit",getElementData(getLocalPlayer(),"Medic Kit")+1) setElementData(getLocalPlayer(),"Painkiller",getElementData(getLocalPlayer(),"Painkiller")+1) setElementData(getLocalPlayer(),"Morphine",getElementData(getLocalPlayer(),"Morphine")+1) setElementData(getLocalPlayer(),"Bandage",getElementData(getLocalPlayer(),"Bandage")+1) setElementData(getLocalPlayer(),"Water Bottle",getElementData(getLocalPlayer(),"Water Bottle")+1) setElementData(getLocalPlayer(),"Burger",getElementData(getLocalPlayer(),"Burger")+1) setElementData(getLocalPlayer(),"Tire",getElementData(getLocalPlayer(),"Tire")+1) setElementData(getLocalPlayer(),"Engine",getElementData(getLocalPlayer(),"Engine")+1) setElementData(getLocalPlayer(),"Tank Parts",getElementData(getLocalPlayer(),"Tank Parts")+1) setElementData(getLocalPlayer(),"Camouflage Clothing",getElementData(getLocalPlayer(),"Camouflage Clothing")+1) setElementData(getLocalPlayer(),"Army Clothing",getElementData(getLocalPlayer(),"Army Clothing")+1) setElementData(getLocalPlayer(),"Ghost Clothing",getElementData(getLocalPlayer(),"Ghost Clothing")+1) setElementData(getLocalPlayer(),"K.B.K Backpack",getElementData(getLocalPlayer(),"K.B.K Backpack")+1) setElementData(getLocalPlayer(),"Ghillie Suit",getElementData(getLocalPlayer(),"Ghillie Suit")+1) setElementData(getLocalPlayer(),"Civilian Clothing",getElementData(getLocalPlayer(),"Civilian Clothing")+1) setElementData(getLocalPlayer(),"GPS",getElementData(getLocalPlayer(),"GPS")+1) setElementData(getLocalPlayer(),"Map",getElementData(getLocalPlayer(),"Map")+1) setElementData(getLocalPlayer(),"Toolbox",getElementData(getLocalPlayer(),"Toolbox")+1) end guiLabelSetColor( SHOP.label[1],10,255,10) guiSetText( SHOP.label[1],"You succesfully bought "..selectedItem.." and you still have "..(money -tonumber(price)).." K.B.K Points") else guiLabelSetColor( SHOP.label[1],255,10,10) guiSetText( SHOP.label[1],"You are missing "..(price -tonumber(money)).." K.B.K Points") end else guiSetText( SHOP.label[1],"Select something first") guiLabelSetColor( SHOP.label[1],255,255,255) end end end function click () local selectedItem = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 1 ) local price = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 2 ) guiSetText( SHOP.label[1],"To buy "..selectedItem.." for "..price.." K.B.K Points press button below") guiLabelSetColor( SHOP.label[1],255,255,255) end
  14. Hello friends! We want to introduce you to the new gamemode in MTA. Would you like to visit Mars? Subscribe to the topic to get the latest news! Twitter: https://twitter.com/MTAMarsX VK: https://vk.com/mtamarsx
  15. Quando o player chegar no marker, ao invez de pegar o trabalho de uma vez, ele ter q digitar o comando do addCommandHandler Obs: A Mensagem de quando ele passa em cima do marker mandando o player digitar o tal comando eu ja sei fazer.. mas tentei de varias formas adicionar o addCommandHandler e fracassei! Eu tambem queria saber, como faço pro marker do "Mfim4" sumir após o player completar o trabalho! O Marker do Mfim4 fica no lugar, mesmo sem a pessoa estar no trabalho e ele nao sai server.lua local Minicio4 = createMarker (1038.02332, -1337.93970, 12.8, "cylinder", 1, 16, 102, 231, 100) local Mfim4 = createMarker ( 2801.29663, -1088.36243, 30.72142 -1, "cylinder", 2, 0 ,255 ,0, 255 ) local Bfim4 = createBlipAttachedTo ( Mfim4, 19 ) setElementVisibleTo ( Bfim4, root, false ) veh = {} function incio4 (source) if isElementWithinMarker(source, Minicio4) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Trabalho = true veh[source] = createVehicle(498,1009.50598, -1355.16431, 13.34428) setElementVisibleTo ( Bfim4, source, true ) warpPedIntoVehicle ( source, veh[source] ) dxMsg(source, "Leve as rosquinhas ate a bandeira no radar!", "info") end end addEventHandler( "onMarkerHit", Minicio4, incio4 ) function fim4 (source) if veh[source] and isElement(veh[source]) then destroyElement (veh[source]) givePlayerMoney(source,2500) -------------- Caso queira mudar o dinheiro que o player vai ganhar ao finalizar o trabalho setElementVisibleTo ( Bfim4, source, false ) setElementVisibleTo ( entregafinalizar, source, false ) dxMsg(source, "Você entregou as rosquinhas a fabrica e ganhou R$2500!", "sucess") else end end addEventHandler("onMarkerHit",Mfim4 ,fim4) function sair4 (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( Bfim4, source, false ) destroyElement (veh[source]) dxMsg(source, "Você saiu do veiculo e perdeu o trabalho!", "error") else end end addEventHandler ( "onVehicleExit", getRootElement(), sair4 ) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end O Client eu fiz um script text que fica esrito em cima do marker o nome do trabalho mas isso nao tem nada haver ent n colocarei!
  16. local redcircle = dxCreateTexture("teszt.png") addEventHandler("onClientRender", root, function() dxDrawMaterialLine3D(-1989.73804, 214.91431, 50,-1989.73804, 214.91431,43.1096496582031, redcircle, 6, tocolor(255,255,255),0,5,6) end) I change numbers, but i cannot rotate the image... how to rotate the image? sorry for my bad english..
  17. Привет друзья! Мы хотим представить вам новый игровой режим в МТА. Хотели бы вы побывать на Марсе? Подписывайтесь на топик, чтобы получать самые последние новости! Twitter: https://twitter.com/MTAMarsX VK: https://vk.com/mtamarsx
  18. local Minicio4 = createMarker (1038.02332, -1337.93970, 13.72656 -1, "cylinder", 1, 16 ,102 ,231, 100) Quando coloco -1 após as coordenadas, junto com o marker de tamanho 1 após o "cylinder" o script nao funciona!!! Todos os markers de trab do meu servidor são do tamanho "1" queria deixar esse tmb oque é glr ? Obs: eu sublinei e grifei o -1 e o tamanho do marker q é "1" após o "cylinder" para facilitar
  19. Eu novamente aqui skkssk, Então meus irmãos, é um script que baixei do site original do mta, muitos devem conhece-l, é o script de danças do fortnite! Mais assim, parece que ele nao esta configurado e eu meio que nao entendo sobre arquivos ifp de dança, o author desse script, colocou um exemplo nele, que quando troca de nick exibe a animação e realmente apaguei os -- e funcionou, eu ate entendi, o script vem com 13 danças, porem nao estou conseguindo configurar! server.lua function setPedFortniteAnimation (ped,animation,tiempo,repetir,mover,interrumpible) if (type(animation) ~= "string" or type(tiempo) ~= "number" or type(repetir) ~= "boolean" or type(mover) ~= "boolean" or type(interrumpible) ~= "boolean") then return false end if isElement(ped) then if animation == "baile 1" or animation == "baile 2" or animation == "baile 3" or animation == "baile 4" or animation == "baile 5" or animation == "baile 6" or animation == "baile 7" or animation == "baile 8" or animation == "baile 9" or animation == "baile 10" or animation == "baile 11" or animation == "baile 12" or animation == "baile 13" then for i = 1,3 do triggerClientEvent ( root, "setPedFortniteAnimation", root, ped,animation,tiempo,repetir,mover,interrumpible ) if tiempo > 1 then setTimer(setPedAnimation,tiempo,1,ped,false) setTimer(setPedAnimation,tiempo+100,1,ped,false) end end end end end --[[ EJEMPLO/EXAMPLE CUANDO CAMBIA EL NICK WHEN NICK IS CHANGED function wasNickChangedByUser(oldNick, newNick, changedByUser) setPedFortniteAnimation(source,"baile 8",7000,true,false,false,false) end addEventHandler("onPlayerChangeNick", getRootElement(), wasNickChangedByUser) -- add an event handler --]] function howtouse ( player, command, dance ) if isElement(player) then exports.fortnitedances:setPedFortniteAnimation(player,"baile "..dance.."",-1,true,false,false,false) end end addCommandHandler ( "dance", howtouse ) client.lua local customIfp = nil function setPedFortniteAnimation (ped,animation,tiempo,repetir,mover,interrumpible) if (type(animation) ~= "string" or type(tiempo) ~= "number" or type(repetir) ~= "boolean" or type(mover) ~= "boolean" or type(interrumpible) ~= "boolean") then return false end if isElement(ped) then if animation == "baile 1" or animation == "baile 2" or animation == "baile 3" or animation == "baile 4" or animation == "baile 5" or animation == "baile 6" or animation == "baile 7" or animation == "baile 8" or animation == "baile 9" or animation == "baile 10" or animation == "baile 11" or animation == "baile 12" or animation == "baile 13" then for i = 1,3 do setPedAnimation(ped, "Fortnite_"..i.."", animation, tiempo, true, false, false) if tiempo > 1 then setTimer(setPedAnimation,tiempo,1,ped,false) setTimer(setPedAnimation,tiempo+100,1,ped,false) end end end end end addEvent("setPedFortniteAnimation",true) addEventHandler("setPedFortniteAnimation",getRootElement(),setPedFortniteAnimation) addEventHandler("onClientResourceStart", resourceRoot, function ( startedRes ) customIfp = engineLoadIFP ("Fortnite pt1.ifp", "Fortnite_1") customIfp2 = engineLoadIFP ("Fortnite pt2.ifp", "Fortnite_2") customIfp3 = engineLoadIFP ("Fortnite pt3.ifp", "Fortnite_3") if customIfp and customIfp2 and customIfp3 then outputDebugString ("Animaciones de Fortnite cargadas") else outputDebugString ("Las animaciones de Fortnite no fueron cargadas") end end ) Vou colocar o meta.xml tambem pra voces verem o export caso possa ser isso tambem meta.xml <meta> <info author="Drex" version="1.1" name="Bailes de Fortnite" type="script" /> <export function="setPedFortniteAnimation" type="shared" /> <file src="Fortnite pt1.ifp" /> <file src="Fortnite pt2.ifp" /> <file src="Fortnite pt3.ifp" /> <script src="client.lua" type="client" cache="false" /> <script src="server.lua" type="sever" cache="false" /> </meta>
  20. Encontrei depois de muito tempo um sistema de Patentes bem bacana, só que gostaria de saber como faço pra aparecer no scoreboard. alguém pode me ajudar ??? Se for necessário posto o script aqui com todos os créditos ao criador. Me ajudem !?
  21. if i create a table, and i insert datas with table.insert, the datas are deleted when i reconnect.. why? how to save datas? sorry for my terrible english :ss
  22. function onClientClick(button, state) if button == "left" and state == "down" then for k, v in ipairs(fegyverek) do if isInBox(screenW * 0.5703, screenH * 0.2700+(elem * 49.5), screenW * 0.0656, screenH * 0.0269) then fegyver = k end end if isInBox(screenW * 0.5703, screenH * 0.2700+(elem * 49.5), screenW * 0.0656, screenH * 0.0269) then if fegyver == 3 then outputChatBox("asd") end end end end addEventHandler("onClientClick", root, onClientClick) function isInBox(xS,yS,wS,hS) if(isCursorShowing()) then local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*sX, cursorY*sY if(cursorX >= xS and cursorX <= xS+wS and cursorY >= yS and cursorY <= yS+hS) then return true else return false end end end What wrong in this? No error/warning in debugscript..
  23. Hi there! I've been trying to make a script for vehicle engine starter. My idea is, that player would have to hold down a key for 2 seconds and then the engine would start. Is there anybody that can help me with this please?
  24. Hello guys, i have a big problem. I created some object in interior, after the script was loaded, it did not create the objects. HERE THE SCRIPT pls help local mysql = exports.mta_connection:getConnection() local loadedRoulettePoints = 0 function createRoulettePoint(x,y,z,r,i,d,player) x = tonumber(x) y = tonumber(y) z = tonumber(z) r = tonumber(r) i = tonumber(i) d = tonumber(d) local insertQuery = dbQuery(mysql, "INSERT INTO roulettes SET position = ?", toJSON({x, y, z, r, i, d})) local insertResult, insertNumber, insertID, inti, dim = dbPoll(insertQuery, -1) local inti = getElementInterior(player) local dim = getElementDimension(player) if insertResult then temp = createObject(1978, x, y, z, 0, 0, r) if isElement(temp) then setElementData(temp, "dbid", insertID) setElementInterior(temp, inti) setElementDimension(temp, dim) setElementData(temp, "isRefill", true) for k,v in ipairs(getElementsByType("player")) do if getElementData(v,"acc:admin") >= 7 then outputChatBox("#7cc576[New - Network]:#0094ff "..getElementData(player, "char:anick").." #fffffflétrehozott egy rulett asztalt. ID:#7cc576 "..insertID,v,255,255,255,true) end end end end end addCommandHandler("createroulette", function(player) if getElementData(player, "acc:admin") >= 7 then x,y,z = getElementPosition(player) _,_,r = getElementRotation(player) i = getElementInterior(player) d = getElementDimension(player) createRoulettePoint(x,y,z,r,i,d,player) end end) addCommandHandler("delroulette", function(player) if getElementData(player, "acc:admin") < 7 then return end local id = getNearestRoulettePoint(player) local interiorka = getElementInterior(player) if id ~= -1 and getElementData(id, "isRefill") then id = getElementData(id, "dbid") interiorka = getElementData(interiorka, "dbid") end if id == -1 then outputChatBox("#D63F3E[New - Network]: #ffffffNincs a közeledben rulett asztal.", player, 0, 0, 0, true) return end local qh = dbQuery(mysql, "DELETE FROM roulettes WHERE id = ?", id) local removeResult, _, removeID = dbPoll(qh, -1) if removeResult then for k,v in ipairs(getElementsByType("player")) do if getElementData(v,"acc:admin") >= 1 then outputChatBox("#7cc576[New - Network]:#0094ff "..getElementData(player, "char:anick").." #fffffftörölt egy rulett asztalt.",v,255,255,255,true) end end for k,v in ipairs(getElementsByType("object")) do if getElementData(v, "isRefill") and getElementData(v, "dbid") == id then destroyElement(v) end end end end) function getNearestRoulettePoint(ep) local pe = {getElementPosition(ep)} local dis = 2 local dis2 = 0 local obj = -1 local type = "object" for key, value in ipairs(getElementsByType(type)) do local p2 = {getElementPosition(value)} dis2 = getDistanceBetweenPoints3D (pe[1], pe[2], pe[3], p2[1], p2[2], p2[3]) if tonumber(dis2) < tonumber(dis) then dis = dis2 obj = value end end return obj end function loadRoulettePoints(resource, object) if resource ~= getThisResource() then return end loadedRoulettePoints = 0 local loaderQuery = dbPoll(dbQuery(mysql, "SELECT * FROM roulettes"), -1) if loaderQuery then for key, value in ipairs(loaderQuery) do local id = tonumber(value["id"]) local position = fromJSON(value["position"]) local interior, dimension = getElementsByType("object") local inti = getElementInterior(interior) local dim = getElementDimension(dimension) for a, p in ipairs (getElementsByType("object")) do if p then local loadedRoulettes = createObject(1978, position[1], position[2], position[3], 0, 0, position[4]) setElementData(loadedRoulettes, "dbid", id) setElementInterior(loadedRoulettes, inti) setElementDimension(loadedRoulettes, dim) setElementDoubleSided(loadedRoulettes, true) local loadedPedPoint = createPed(123, position[1], position[2], position[3], position[4]+90) setElementData(loadedPedPoint, "dbid", id) --setElementInterior(loadedPedPoint, inti) --setElementDimension(loadedPedPoint, dim) end end loadedRoulettePoints = loadedRoulettePoints + 1 end outputDebugString(loadedRoulettePoints .. " rulett asztal betöltve.") end end addEventHandler("onResourceStart", resourceRoot, loadRoulettePoints)
  25. Como faço pra quando alguem manda mensagem pro player, ele digita /r ( nome do player ) ( mensagem ) para responder automaticamente e ai por diante function privateMessage(thePlayer,commandName,sendToName,...) local pvWords = { ... } local pvMessage = table.concat( pvWords, " " ) if sendToName then if (getPlayerFromParticalName (sendToName)) then toPlayer = (getPlayerFromParticalName (sendToName)) if not (toPlayer == thePlayer) then if not (pvMessage == "") then outputChatBox("#00ff00[PV]#FFFFFF Enviada para #FFFFFF" .. getPlayerName(toPlayer) .. "#FFFFFF: " .. pvMessage, thePlayer, 255, 255, 255, true) outputChatBox("#00ff00[PV]#FFFFFF Recebida de #FFFFFF" .. getPlayerName(thePlayer) .. "#FFFFFF: " .. pvMessage, toPlayer, 255, 255, 255, true) else outputChatBox("#00ff00[PV]#FFFFFF Sintaxe inválida! Use:#FFFFFF /pv [Nome do Jogador] [Mansagem]", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Você não pode mandar pv para si mesmo#FFFFFF!", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Jogador não encontrado! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Sintaxe inválida! Use:#FFFFFF /pv [Nome do Jogador] [Mensagem]", thePlayer, 255, 255, 255, true) return false end end addCommandHandler("pv", privateMessage) function infopv() outputChatBox ('',getRootElement(),255,255,255,true) end setTimer(infopv, 350000, 350) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
×
×
  • Create New...