Jump to content

GR6

Members
  • Posts

    186
  • Joined

  • Last visited

Everything posted by GR6

  1. GR6

    Microphone on CEF

    I'm trying to use discord app inside the game, everything works fine, except the microphone appears unusable.
  2. Hi everyone, is there possible to use microphone on CEF? I took a look at the wiki, but i didn't find nothing about it.
  3. local function ujteamsay(message, messageType) if messageType == 2 then cancelEvent() local team = getPlayerTeam(source) if(team) then for i,player in pairs(getPlayersInTeam(team)) do outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, player, red, green, blue, true ) end end end end addEventHandler("onPlayerChat", root, ujteamsay)
  4. GR6

    [Help] getTime

    setTimer(function(), local time = getRealTime() if(time.hour == "21" and time.minute == "0") then elseif(time.hour == "5" and time.minute == "0") then end end, 60000, 0)
  5. I'm not sure if mta browser enable cookies, try this to store on JS... http://www.w3schools.com/js/js_cookies.asp
  6. I think it is easier for your purpose: (You'll need to create an object alpha 0 and attach to your car) https://wiki.multitheftauto.com/wiki/MoveObject
  7. Somente em server o player é passado como parâmetro(no caso thePlayer). function showVehicleName () local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then outputChatBox ( "Name of the Vehicle: " .. getVehicleName ( theVehicle ), thePlayer ) else outputChatBox ( "You do not have a Vehicle!", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "getcarname", showVehicleName )
  8. GR6

    cancel bind

    addEventHandler("onClientKey", getRootElement(), function(button, press) if(button == "space") then local keyState = getKeyState("w") if(keyState) then cancelEvent() end end end)
  9. GR6

    cancel bind

    It is not possible to cancel bindKey function, only via event.
  10. GR6

    cancel bind

    Something like this? toggleControl("sprint", false)
  11. GR6

    cancel bind

    addEventHandler("onClientKey", root, function(key, press) if(key == "w") then cancelEvent() end end) https://wiki.multitheftauto.com/wiki/OnClientKey
  12. Take a look on Performancebrowser to check server usage first... it seems like high usage of bandwidth, memory or even overloaded cpu. https://wiki.multitheftauto.com/wiki/Re ... ncebrowser
  13. I'm not sure how to do it correctly, but you need a recursion to loop through the sub tables. Something like this below: function table.getIndexByValue(t,value) for i,v in pairs(t) do -- or ipairs, if count zero if(v == value) then return i elseif(type(v) == "table") then return table.getIndexByValue(v,value) -- recursion, call the same function for internal tables end end end
  14. Yes, it has difference. When you are not logged in, automatically you get an guest account(when you quit the game, this account is deleted, consequently all data of this account will be lost). So, if you check using getPlayerAccount() it will return the account being guest or not, to be sure that the player logged in use isGuestAccount() after you got the account from the player using getPlayerAccount(). https://wiki.multitheftauto.com/wiki/IsGuestAccount https://wiki.multitheftauto.com/wiki/GetPlayerAccount
  15. setCursorAlpha(0) function show() local showing = isCursorShowing () if showing then local screenx, screeny = getCursorPosition() dxDrawImage(screenx, screeny, 50, 50, 'files/crosshair.png') end end addEventHandler('onClientRender', root, show )
  16. function meteoro(targetPlayer) local x, y, z = getElementPosition(getLocalPlayer()) createProjectile(getLocalPlayer(),20, x ,y, z+10, 2, getLocalPlayer()) end addCommandHandler("meteoro", meteoro) Parece que o erro do seu código era apenas o id, pois somente o projétil 20 se direciona ao Target.
  17. https://wiki.multitheftauto.com/wiki/OnClientCursorMove https://wiki.multitheftauto.com/wiki/OnClientMouseMove
  18. Esse erro ocorreu pq não tem como concatenar um elemento (no caso o player) com uma string, o certo seria usar o nome da conta. segue o exemplo abaixo: local account = getPlayerAccount(player) if(account) then -- caso exista local accountName = getAccountName(account) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Console" ) ) then -- caso a conta seja Console end end
  19. markers = { {x = -1990.24292, y = 262.62424, z = 34.00000}, } for i,marker in pairs(markers) do createMarker(marker.x, marker.y, marker.z, "cylinder", 4, 0, 141, 255, 255, getRootElement( ) ) end Não entendi muito bem oque você está tentando fazer, mas se é pra criar Markers com uma table poderia ser assim.
  20. Uma opção além das citadas poderia ser o próprio database do mta registry.db, através da função executeSQLQuery. No link abaixo explica um pouco sobre o uso e também alguns exemplos de comandos em SQL. https://wiki.multitheftauto.com/wiki/ExecuteSQLQuery
  21. Você ta com o time freeze? ou game speed maior que 1?
×
×
  • Create New...