Search the Community

Showing results for tags 'help'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 631 results

  1. Entao to querendo cria um simples trabalho de entrega com tabela para quando o cara entrega ele ganha um dinheiro alguem pode me ajuda eu tentei usa esse trabalho como fonte (em Baixo) mais ele nao cria os markes é nao cria os blips pra entregar, Se alguem poder me ajuda agradeço des de ja Serve = local StartEmprego02 = createMarker (1314.20227, -1159.26379, 23.82813 -1, "cylinder", 1.2, 0 ,26 ,255, 95) -- Local Onde Pega O Emprego ------------------------------------------------------------------------------------------------------------------------------------------------------------ local LetraTEmprego02 = createBlipAttachedTo ( StartEmprego02, 42 ) -- Letra T setBlipVisibleDistance( LetraTEmprego02 , 700) -- Distancia Letra T "200" = 200 Metros Pra Ficar Visivel ------------------------------------------------------------------------------------------------------------------------------------------------------------ function HitarMarkerJobEmprego02 ( ThePlayer, d ) if getElementType(ThePlayer) == "player" and d and isPedInVehicle(ThePlayer) ~= true then outputChatBox("#ffffff[ #001AFFTrabalho De Traficante #ffffff] - #FFFFFFDigite#001AFF/sorvete #ffffff- Para pegar as drogas!", ThePlayer, 255, 255, 255, true) end end addEventHandler("onMarkerHit", StartEmprego02, HitarMarkerJobEmprego02) ------------------------------------------------------------------------------------------------------------------------------------------------------------ local vehEmprego02 = {} function ComecoDeTudoEmprego02 (source) if isElementWithinMarker(source, StartEmprego02) and isPedInVehicle(source) ~= true and getElementDimension(source) == getElementDimension(StartEmprego02) then if vehEmprego02[source] and isElement( vehEmprego02[source] ) then destroyElement ( vehEmprego02[source] ) end local x,y,z = getElementPosition(source) setElementData( source, "Trabalho", "traficante de drogas" ) vehEmprego02[source] = createVehicle(423, 1325.20374, -1173.83887, 23.65397) setVehicleLocked(vehEmprego02[source],true) warpPedIntoVehicle ( source, vehEmprego02[source] ) setPlayerWantedLevel( source, 1 ) triggerClientEvent( player, "traficante:onRequestDoAction", player, "create" ) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFAgora Você É Um Traficante", source, 255, 255, 255, true) -- Mensagem Apos Pegar O Emprego outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFLeve a Van até o Local Indicado no Mapa", source, 255, 255, 255, true) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFSe você for pego pela policia será preso! Então tome cuidado.", source, 255, 255, 255, true) -- Mensagem Apos Pegar O Emprego local vehOwner = source addEventHandler( "onVehicleExplode", vehEmprego02[source], function() removePlayerFromJob( vehOwner, source, true ) outputChatBox( "#ffffff[ #001AFFTrabalho #ffffff] - O seu veículo explodiu e você perdeu o emprego!", vehOwner, 230, 0, 0 ) end ) end end addCommandHandler ( "sorvete", ComecoDeTudoEmprego02 ) -- Comando Pra Pegar O Emprego addEvent( "traficante:onPlayerFinishMission", true ) addEventHandler("traficante:onPlayerFinishMission", root, function() givePlayerMoney(client, 500) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFEntrega Finalizada, Você recebeu R$5000.",client,0,0,0,true) -- Mensagem Apos Finalizar O Emprego removePlayerFromJob( client, vehEmprego02[client] ) end ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function SaiuDoEmprego02 (player) if (vehEmprego02[player]) and isElement(vehEmprego02[player]) then removePlayerFromJob( player, vehEmprego02[player], true ) outputChatBox ("#ffffff[#001AFFTrabalho #ffffff] - #FFFFFFVocê Saiu Da Van E A Droga Foi Presa.", player ,0,0,0,true) -- Perder O Emprego Apos Sair Do Veiculo end end addEventHandler ( "onVehicleExit", resourceRoot, SaiuDoEmprego02 ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function MorreuNoEmprego02 ( ammo, attacker, weapon, bodypart ) if isElement(vehEmprego02[source]) then removePlayerFromJob( source, vehEmprego02[source], true ) outputChatBox ("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFVoce Morreu e Perdeu o Emprego", source ,0,0,0,true) -- Perder O Emprego Apos Morrer end end addEventHandler ( "onPlayerWasted", getRootElement(), MorreuNoEmprego02 ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function SaiuDoServerEmprego02 ( quitType ) if isElement(vehEmprego02[source]) then destroyElement (vehEmprego02[source]) -- Destruir Veiculo Apos Jogador Sair Do Servidor No Emprego end end addEventHandler ( "onPlayerQuit", getRootElement(), SaiuDoServerEmprego02 ) function removePlayerFromJob( player, pVeh, removeFromClient ) if isElement(player) and isElement(pVeh) then setElementData( player, "Trabalho", nil ) destroyElement( pVeh ) if removeFromClient then triggerClientEvent( player, "traficante:onRequestDoAction", player, "destroy" ) end end end local _destroyElement = destroyElement function destroyElement(elem) if isElement(elem) then return _destroyElement(elem) end return false end ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Client = local traficante_locations = { { 1135.3686523438, -2004.0344238281, 69.0078125 }, { 1318.93652, -1137.58923, 23.65625 } --{ x, y, z }, --{ x, y, z }, --{ x, y, z } } local traficante = {} function onRequestDoActionFunc ( actionstr ) if actionstr == "create" then createLocation( 1 ) elseif actionstr == "destroy" then destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) traficante.StopEmprego02, traficante.BlipFinalEmprego02 = nil, nil end end addEvent( "traficante:onRequestDoAction", true ) addEventHandler( "traficante:onRequestDoAction", root, onRequestDoActionFunc ) function FimDeTudoEmprego02 () if traficante.StopEmprego02 and isElementWithinMarker(localPlayer, traficante.StopEmprego02) and getElementData( localPlayer, "trabalho" ) == "traficante de drogas" then if indexID == #traficante_locations then indexID = nil destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) traficante.StopEmprego02, traficante.BlipFinalEmprego02 = nil, nil return triggerServerEvent( "traficante:onPlayerFinishMission", localPlayer ) end outputChatBox( "#ffffff[ #001AFFTrabalho #ffffff] - Outra entrega disponível, leve a van até o local", 0,0,0,true ) createLocation( indexID + 1 ) end end addCommandHandler ( "entregar", FimDeTudoEmprego02 ) function AvisoEntregaFimEmprego02 (hitElement, dim) if isPedInVehicle(hitElement) and hitElement == localPlayer and dim and source == traficante.StopEmprego02 then outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFDigite #001AFF/entregar #FFFFFFPara Concluir o Trabalho",0,0,0,true) end end addEventHandler( "onClientMarkerHit", resourceRoot, AvisoEntregaFimEmprego02 ) function createLocation( id ) indexID = tonumber(id) or 1 destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) local x,y,z = unpack( markerTruck[indexID] ) traficante.StopEmprego02 = createMarker( x, y, z, "cylinder", 7, 0 ,26 ,255, 95 ) traficante.BlipFinalEmprego02 = createBlipAttachedTo( traficante.StopEmprego02, 0 ) return indexID end local _destroyElement = destroyElement function destroyElement(elem) if isElement(elem) then return _destroyElement(elem) end -- return false end
  2. perdão galera consegui resolver o motivo desse tópico, quando entro no servidor aparece um painelzinho em baixo do chat, com o icone do rc, do wifi e uns outros. eu sei que é algum mod originario do mta mas qual é ?
  3. When i restart the script, good for a while then becomes black.. How to fix this? Image of the bug: https://imgur.com/a/1h1wVm4
  4. function haveTheIten(player, veiculo) if isElement(player) and tostring(veiculo) then local result = dbPoll(dbQuery(sql,"SELECT * FROM lojaveiculos WHERE conta=? AND veiculo=?", getAccountName(getPlayerAccount(player)), veiculo), -1) if #result ~= 1 then return true else return false end end end Ajude-me pfv chama discord que explico melhor, Krister#9443
  5. Help! How to disable weapon muzzle (fire) from replaced weapons? I even replaced the textures of the new weapon models in the txd workshop, but this did not help. I will be grateful
  6. Hi! I'm a kind of noob scripter making a VIP panel, but I do not find a way to set.. for example, I want the player to spawn op weapons (only for vip users in this case), like Rocket Launcher, only a few times at day, not more than the established number of times for spawning it. Is it possible to do that? Also spawn Rhino's and some vehicles that I made only for VIP's.
  7. 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 ❤️
  8. Hola, quisiera hacer un top 30 de los jugadores con mas kills, pero de esto desconosco hice algo pero, no tiene logica alguna.. en especial en el server.lua Si me podrian dejar un par de comentarios explicando cada cosa estaria agradecido. local Key = "F10" --- bind key HD = { gridlist = {}, S3D = {}, q = {} } function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end HD.wnd = guiCreateWindow(415, 146, 450, 505, "Top 30 Kill Script || ", false) guiWindowSetSizable(HD.wnd, false) guiSetAlpha(HD.wnd, 1.00) guiSetProperty(HD.wnd, "CaptionColour", "FFF00FFF") centerWindow(HD.wnd) HD.gridlist[1] = guiCreateGridList(18, 36, 430, 500, false, HD.wnd) local column = guiGridListAddColumn(HD.gridlist[1], "Rank", 0.20 ) local column1 = guiGridListAddColumn(HD.gridlist[1], "Player Name", 0.30 ) local column2 = guiGridListAddColumn(HD.gridlist[1], "Total Kill", 0.20 ) local column3 = guiGridListAddColumn(HD.gridlist[1], "Total Deaths", 0.20 ) for i = 1,30 do local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column3, "N/A", false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 0, 180, 255) guiGridListSetItemColor(HD.gridlist[1], row, column3, 0, 180, 255) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 0, 0) end guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) bindKey (Key, "down", function() guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) showCursor(guiGetVisible(HD.wnd)) triggerServerEvent("onTopPlayerListRequest", localPlayer) end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function updateTopList(playerName, Value, i) local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, tostring(playerName), false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, convertNumber(Value), false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 0, 180, 255) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 0, 0) end addEvent("onClientReceiveTopListTable", true) addEventHandler("onClientReceiveTopListTable", root, updateTopList) function update() guiGridListClear(HD.gridlist[1]) end addEvent("deltTop", true) addEventHandler("deltTop", root, update) addEventHandler( 'onResourceStart', getResourceRootElement(getThisResource()), function( ) outputChatBox("==[ Top-30 Kill Script | By K0w1 ]==", root, 255, 125, 0,true) outputChatBox("==[ Press F10 To Open Top-30 Top-Kill Script ]==", root, 50, 255, 0,true) end ) function onWasted(_,killer,_,body) if(killer and getElementType(killer)=="player" and killer~=source)then addPlayerKillCount(killer) addWastedCount(source) end if(killer and getElementType(killer)~="player" and killer~=source)then addWastedCount(source) end end addEventHandler("onPlayerWasted",root,onWasted) function addPlayerKillCount(p) local acc = getPlayerAccount(p) if(acc and isGuestAccount(acc)==false)then local pk = tonumber((getAccountData(acc,"Kills"))) or 0 setAccountData(acc,"Kills",pk+1) end end function addWastedCount(p) local acc = getPlayerAccount(p) if(acc and isGuestAccount(acc)==false)then local w = tonumber((getAccountData(acc,"Wasted"))) or 0 setAccountData(acc,"Wasted",w+1) end end function onChangeNick(old,new) local acc = getPlayerAccount(source) if(acc and isGuestAccount(acc)==false)then local nickAcc = string.gsub(new,"#%x%x%x%x%x%x","") setAccountData(acc,"PlayerName",nickAcc) end end addEventHandler("onPlayerChangeNick",root,onChangeNick) addEvent("onTopPlayerListRequest",true) addEventHandler("onTopPlayerListRequest",root, function ( player, text ) if not isElement( player ) then return end local name = getAccountName(player) local sendTable = {} data = tonumber(getAccountData(player,"Kills") or 0)or 0 for i = 1, #data do table.insert(sendTable,{["playerName"] = name,["Value"] = data}) end if #CreatTop >0 then table.sort(sendTable,function(a,b) return tonumber(a["Value"] or 0)>tonumber(b["Value"] or 0) end) setTimer( function() for k, data in ipairs(sendTable) do if k == 1 then triggerClientEvent (player,"deltTop",player) end triggerClientEvent (player,"onClientReceiveTopListTable",player,tostring(data.name),tostring(data.score),tonumber(k)) if k == 30 then table.remove(sendTable) break end end end, 500, 1 ) end end)
  9. 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
  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. I have this: function Salir() if isElement(tableVehicles[source]) then destroyElement(tableVehicles[source]) end end addEventHandler("onPlayerVehicleExit",getRootElement(),Salir) This function destroys the vehicle when the player leaves, I want this to happen after a second and not immediately, i need to use "Set timer", but I do not know how to use it, I tried different ways but none of them
  13. The code is written to mute the player upon spamming, which works fine, except that if a player quits the game, changes his nick, and joins again, he does get muted, but won't get unmuted. Also, if the player quits after being muted, and waits some time before joining back, he'll be forever muted again and won't get unmuted. Can't think of a way to fix this. Any help would be appreciated. mutedPlayerSerials = {} interval = 20000 addEvent("mutePlayer", true) addEventHandler("mutePlayer", root, function() local mutedPlayer = getPlayerName(source) local serial = getPlayerSerial(source) outputChatBox(mutedPlayer.." has been muted by console for spamming.", root, 255, 100, 100) table.insert(mutedPlayerSerials, serial) setPlayerMuted(source, true) setTimer(function() local serial = nil mutedPlayerSerials = {} local player = getPlayerFromName(mutedPlayer) if player then setPlayerMuted(player, false) outputChatBox(mutedPlayer.." has been unmuted by console.", root, 100, 255, 100) end end, interval, 1) end) mutedPlayer = false addEventHandler("onPlayerJoin", root, function() local serial = getPlayerSerial(source) for _, v in pairs(mutedPlayerSerials) do if serial == v then mutedPlayer = true break end end if mutedPlayer == true then local mutedPlayerName = getPlayerName(source) local mutedPlayer = getPlayerFromName(mutedPlayerName) setPlayerMuted(mutedPlayer, true) outputChatBox(mutedPlayerName.." has been muted by console.", root, 255, 100, 100) end end)
  14. i deleted a world object, and i mapped to the world object's place, but how to fix this bug: https://imgur.com/a/VAEqOKy ?? :s
  15. https://imgur.com/a/ZbuQTmR What is the road object ID? I need this object for my map.. :s
  16. 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!
  17. Olá! Tudo bom com vocês? Eu ainda sou amador, e utilizo alguns loops prontos, mas nunca montei um, na verdade, nem sequer sei como ele funciona. Alguém poderia me explicar como eu poderia utilizá-lo para obter a lista de jogadores, ou como utilizá-lo em uma tabela, ou seja, como utilizá-lo de maneira geral. Obrigado! ❤️
  18. Hey, I'm stuck with this script local x,y = guiGetScreenSize() local defScale = 0 local currentScale = defScale local maxScale = 2 local step = 0.08 local turn = true local font = "sans" local text = "Is#99ccaaGh" function renderPulse() if turn == true then currentScale = currentScale + step if currentScale > maxScale then currentScale = maxScale turn = false end else currentScale = currentScale - step if currentScale < defScale then if text == "#99ccaaOdyssey Metamorphosis" then step = 0 else font = "bankgothic" text = "#99ccaaOdyssey Metamorphosis" turn = true end end end local width = dxGetTextWidth(text,currentScale,font, true) local height = dxGetFontHeight(currentScale,font) dxDrawText(text,x/2-width/2,100,width,height,tocolor(0, 204, 170, 255),currentScale,font, "left", "top", false,false,false,true) end addEventHandler("onClientRender",getRootElement(),renderPulse) What it actually do is to write "IsGh" with size 0 and then reach the size of 2 then gets back to size 0 then writes"Odyssey Metamorphosis" with size 0, reach the size of 2 and gets back to 0. But I want to make it's alpha gets from 0 to 255 while "IsGh" size gets from 0 to 2 and "odyssey metamorphosis"s alpha gets from 255 to 0 while it's size is getting from 2 to 0 I haven't find anyway to do it so i thought posting it here will be a better solution.
  19. 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..
  20. Hey, I have problem with calculating the whole text height. local sw, sh = guiGetScreenSize() local newsFont = dxCreateFont("fonts/Lato.ttf", 8) local NEWS = {} -- example texts here function renderNews() local height = 0 for _, v in ipairs(NEWS) do local h = math.ceil((string.len(v) / 65)) * 25 dxDrawRectangle(sw-385, 95+height, 370, h, tocolor(0,0,0,155)) dxDrawText(v, sw-380, 100+height, sw-15, 100+h+height, tocolor(255,255,255,255), 1, newsFont, "left", "top", true, true) height = height + h + 10 end end I don't have any idea how to do that. I want the height to match every text.
  21. Hello, i need help to do a Equalizer for : http://prntscr.com/ljharu the paint job should be moved with the music... and i 0 ideas how to do it
  22. 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
  23. amarelinhoxx

    Help !!!

    How to lower the checkpoint please help me
  24. Hi Friends ! Do you know any way to replace the default sky in the game instead of changing the sky gradient
  25. My friend bought a new laptop. It has an integrated vga eith the processor, and a dedicated vga, but MTA uses the integrated vga and we don’t know how to change it.