Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. Yes. And if there is any local sound exept sound = {} remove it also setSoundMaxDistance( sound, maxdistance ) should be: setSoundMaxDistance( sound [ player ], maxdistance )
  2. JR10

    SQL Question.

    That's because you always update, and you don't insert if no rows was found. addEventHandler( "onPlayerLogin", Spieler, function() local Account = getAccountName( getPlayerAccount( source ) ) local playerTable = executeSQLSelect ( "playerData", "name = '" .. Account .. "'", "x", "y", "z", "r", "s" ) if playerTable and #playerTable == 1 then spawnPlayer( source, playerTable[1][3], playerTable[1][4], playerTable[1][5], playerTable[1][6], playerTable[1][7] ) setCameraTarget( source, source ) fadeCamera( source, true, 1.0 ) else spawnPlayer( source, 100, 100, 20, 90, 285 ) setCameraTarget( source, source ) fadeCamera( source, true, 1.0 ) end end ) On quit: select where name = the account name, and check if it exists and #playerTable == 1 , if so update, else insert.
  3. playSound3D( sound, x, y, z, false ) sound should be a table, and your using it in playSound3D, and you defined it as string before. Edit playSound3D and replace sound with the file path.
  4. function onPlayerJoin ( ) local conta = getPlayerAccount ( source ) local din = getAccountData(conta,"char.1") setPlayerMoney(source,din) end
  5. Oh. Try: function onPlayerJoin ( _ , conta ) local din = getAccountData(conta,"char.dinheiro") setPlayerMoney(source,din) end
  6. JR10

    SQL Question.

    addEventHandler( "onPlayerLogin", Spieler, function() local Account = getAccountName( getPlayerAccount( source ) ) local playerTable = executeSQLSelect ( "playerData", "name = '" .. Account .. "'", "x", "y", "z", "r", "s" ) if playerTable then spawnPlayer( source, playerTable[1][3], playerTable[1][4], playerTable[1][5], playerTable[1][6], playerTable[1][7] ) else -- the player is new end ) Yes, in every server sided script.
  7. client: addEvent ( "playSoundForAllPlayers" , true) addEventHandler("playSoundForAllPlayers", root, function() playSound3D(...) end) And in server, use this whenever you want to play the sound. triggerClientEvent("playSoundForAllPlayers", root)
  8. Here is the thing, how do you expect the player to have an account, (which is not guest) when he joins? use onPlayerLogin.
  9. You use showCursor again. showCursor ( false )
  10. If it's black screen, than there is no script, to fade the camera.
  11. JR10

    MTA 1.1 issue

    That happened to me a lot. I have to say, even though I jumped every where, when I saw the release topic, I think it's released early. It still have bugs. I know the bugs will be fixed, sooner or later.
  12. What? It's the same, start mtaserver.exe, and you need to open ports. https://wiki.multitheftauto.com/wiki/Server_Manual
  13. Download SQLite browser. Open internal.db @ Multi Theft Auto\server\mods\deathmatch\internal.db with SQLite Browser.
  14. JR10

    markers

    That doesn't make any sense. addEventHandler("onClientRender", root, function() local px, py, pz = getElementPosition(getLocalPlayer()) local x, y = getScreenFromWorldPosition(-1921.900, 536.816, 32.340) if not x or not y then return end local camX,camY,camZ = getCameraMatrix() if not isLineOfSightClear ( camX , camY, camZ, px, py, pz, true, false, false, true, false, true, false, getLocalPlayer ( )) then return end dxDrawText("LV", -1921.900, 536.816, 32.340,380.0,tocolor(255,255,255,255),2.0,"default","left","top",false,false,false) end )
  15. Asking them, to post at your site, is really much, pm would be enough.
  16. JR10

    markers

    local x,y= getScreenFromWorldPosition ( posX,posY,posZ ) dxDrawText ( "text", x, y , ...) And onClientRender.
  17. In mtaserver.conf There is 0 Set it to 1.
  18. JR10

    markers

    Because, it's SERVER sided, and you are using getLocalPlayer() use onClientMarkerHit, or use it server side, and use hitElement.
  19. It ended, and 1.1 is released.
  20. JR10

    markers

    Because it's server sided.
  21. JR10

    plz help

    top, you really think, you could get a scripter under your command? Unless you pay him, that's not going to happens.
  22. JR10

    plz help

    OMG, 4 posts. Keep asking, you won't find an answer. Learn and make it yourself, if you can't understand english, not my problem.
×
×
  • Create New...