Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/11/19 in all areas

  1. 1 point
  2. yes you can use html in mta
    1 point
  3. 1 point
  4. local ok = false local screenW, screenH = guiGetScreenSize() local markery = { { -2413.51171875, -602.2509765625 , 132.5625-1,true}, { -2412.392578125, -590.11328125 , 132.6484375-1,true} } local marki = nil for k,v in ipairs( markery ) do marki = createMarker ( v[1],v[2],v[3], "cylinder", 2, 255, 255, 255, 255 ) createPickup( v[1],v[2],v[3],3,1239,2000) setElementData(marki, "markery:gui", v[4]) end ---=-=-=-=-=-=-=-=-=-=-=-= -- enter marker function MarkerEnter(theElement, matchingDimension) if ( theElement == localPlayer ) and ok == false and getElementData(source, "markery:gui") == true then setElementData(localPlayer, "markerygui:player", true) ok = true addEventHandler("onClientRender",root,gui) end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerEnter ) ---=-=-=-=-=-=-=-=-=-=-=-= -- leave marker function MarkerLeave(theElement, matchingDimension) if ( theElement == localPlayer ) and ok == true and getElementData(localPlayer, "markerygui:player") == true then setElementData(localPlayer, "markerygui:player", false) ok = false removeEventHandler("onClientRender",root,gui) end end addEventHandler ( "onClientMarkerLeave", getRootElement(), MarkerLeave ) function gui() dxDrawLine((screenW * 0.2526) - 1, (screenH * 0.3190) - 1, (screenW * 0.2526) - 1, screenH * 0.4922, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.7101, (screenH * 0.3190) - 1, (screenW * 0.2526) - 1, (screenH * 0.3190) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.2526) - 1, screenH * 0.4922, screenW * 0.7101, screenH * 0.4922, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.7101, screenH * 0.4922, screenW * 0.7101, (screenH * 0.3190) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.2526, screenH * 0.3190, screenW * 0.4575, screenH * 0.1732, tocolor(2, 120, 252, 62), false) dxDrawText("Informacja", screenW * 0.3338, screenH * 0.3854, screenW * 0.6120, screenH * 0.4583, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, false, false, false) end now should work
    1 point
  5. local ok = false local screenW, screenH = guiGetScreenSize() local markery = { { -2413.51171875, -602.2509765625 , 132.5625-1,true}, { -2412.392578125, -590.11328125 , 132.6484375-1,true} } local marki = nil for k,v in ipairs( markery ) do marki = createMarker ( v[1],v[2],v[3], "cylinder", 2, 255, 255, 255, 255 ) createPickup( v[1],v[2],v[3],3,1239,2000) setElementData(marki, "markery:gui", v[4]) end ---=-=-=-=-=-=-=-=-=-=-=-= -- enter marker function MarkerEnter(theElement, matchingDimension) if ( theElement == localPlayer ) and ok == false and getElementData(source, "markery:gui") == true then setElementData(localPlayer, "markerygui:player", true) ok = true addEventHandler("onClientRender",root,gui) end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerEnter ) ---=-=-=-=-=-=-=-=-=-=-=-= -- leave marker function MarkerLeave(theElement, matchingDimension) if ( theElement == localPlayer ) and ok == true and getElementData(source, "markerygui:player") == true then setElementData(localPlayer, "markerygui:player", false) ok = false removeEventHandler("onClientRender",root,gui) end end addEventHandler ( "onClientMarkerLeave", getRootElement(), MarkerLeave ) function gui() dxDrawLine((screenW * 0.2526) - 1, (screenH * 0.3190) - 1, (screenW * 0.2526) - 1, screenH * 0.4922, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.7101, (screenH * 0.3190) - 1, (screenW * 0.2526) - 1, (screenH * 0.3190) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.2526) - 1, screenH * 0.4922, screenW * 0.7101, screenH * 0.4922, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.7101, screenH * 0.4922, screenW * 0.7101, (screenH * 0.3190) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.2526, screenH * 0.3190, screenW * 0.4575, screenH * 0.1732, tocolor(2, 120, 252, 62), false) dxDrawText("Informacja", screenW * 0.3338, screenH * 0.3854, screenW * 0.6120, screenH * 0.4583, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, false, false, false) end try this
    1 point
  6. Na função exportada addNotification você deixou source, troque para 'jogador'. Lembre-se de dar acl para o resource e deixar o debug ativado quando testar (/debugscript 3). O segundo if eu não entendi o que você quer fazer ali.
    1 point
  7. Qual o limite de criação de objetos? (quantos objetos cada player pode criar no máximo?)
    1 point
  8. Está faltando um end E pelo que estou vendo na sua lógica, todo mundo que não for Admin vai entrar naquela última condição do else e ficar na ACL Group "Policial".
    1 point
  9. 1- Wrong section, here next time: https://forum.multitheftauto.com/forum/127-programação-em-Lua/ 2- Change: if #result_car ~= 1 then To if #result_car >= 1 then
    1 point
  10. Não faz sentido aquele return e também está faltando um end no final. addCommandHandler ("setlevel", function (thePlayer, cmd, jogador, level) local theJogador = getPlayerFromName (jogador) if (not theJogador) or (not level) then return end if (isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (thePlayer)), aclGetGroup ("Console"))) then setElementData (theJogador, "Level", tonumber(level)) outputChatBox ("Level setado no jogador com sucesso.", thePlayer) end end)
    1 point
  11. addCommandHandler ("setlevel", function (thePlayer, cmd, jogador, level) local theJogador = getPlayerFromName (jogador) if (not theJogador) or (not level) then return end setElementData (theJogador, "Level", tonumber(level)) outputChatBox ("Level setado no jogador com sucesso.", thePlayer) end)
    1 point
  12. Frumos, cred ca o sa folosesc acest mapping pentru un job. Multumesc.
    1 point
×
×
  • Create New...