Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 13/02/22 in Posts

  1. Damn, didn't notice until now, thank you didn't notice until now
    1 point
  2. You named your own function the same as the MTA function. function fadeCamera() fadeCamera(source, true, 0.5, 0, 0, 0) end
    1 point
  3. you don't get the account name, you compare it directly with the player's account, for this, get the account name with getAccountName in the same way, change the playerAccount to accName in the query you sent. function recordarData() local playerAccount = getPlayerAccount(source) if(playerAccount) then if(isGuestAccount(playerAccount)) then return end end local x, y, z = getElementPosition(source) local money = getPlayerMoney(source) local health = getElementHealth(source) local dimension = getElementDimension(source) local interior = getElementInterior(source) local accName = getAccountName(playerAccount) --get player's account name to compare in mysql --Use dbQuery instead of _Exec --replace this with account name local sendInfo = exports.mysql:_Query("UPDATE characters SET x=?, y=?, z=?, money=?, health=?, dimension=?, interior=?, WHERE cuenta=?", x, y, z, money, health, dimension, interior, accName) if (sendInfo) then iprint("Data saved") else iprint("Error saving") end end addEventHandler("onPlayerQuit", getRootElement(), recordarData)
    1 point
  4. I'm not sure, but you can do it this way, the onPlayerLogin event is suitable for this job, you can transfer the data to the game when the player logs in function setData() local playerAccount = getPlayerAccount(source) if(playerAccount) then if(isGuestAccount(playerAccount)) then return end end local accName = getAccountName(playerAccount) -- get player account name local setData = exports.mysql:_Query("SELECT * FROM characters WHERE name=? LIMIT 1", accName) -- Retrieve all column data with account name accName if(setData) then --if successful? if(#setData > 0) then -- if table size is greater than 0 for _,column in ipairs(setData) do setPlayerMoney(source, column["money"]) --get player's money from mysql and set Using: column["column name"] break --leave the for loop immediately when it has set all the data end end end end
    1 point
  5. Normalmente isso deveria funcionar. -- Server-side addEventHandler ("onPlayerJoin", root, function() -- Ativa o evento "resetNewVoice" em todos os clientes quando algum jogador novo entrar no servidor. triggerClientEvent ("resetNewVoice", source) -- O jogador que acabou de entrar (source) será o source deste evento também. end) -- Client-side addEvent ("resetNewVoice", true) addEventHandler ("resetNewVoice", root, function() setSoundVolume (source, 30) -- Aumenta o volume do player que acabou de entrar no servidor. end)
    1 point
  6. You can use UPDATE for this, but make sure the player always has a column in the database. You can use insert once before. do it with a function in your code that uses dbQuery instead of exec because you're using exports I'm not sure function saveDataCharacter() local playerAccount = getPlayerAccount(source) -- get account of player who exited game if(playerAccount) then if(isGuestAccount(playerAccount)) then return end -- if guest account don't continue end local x, y, z = getElementPosition(source) local money = getPlayerMoney(source) local health = getElementHealth(source) --Use dbQuery instead of _Exec --name I'm not sure of the player's account name? local sendInfo = exports.mysql:_Exec("UPDATE characters SET x=?, y=?, z=?, money=?, health=? WHERE name=?", x, y, z, money, health, playerAccount) if (sendInfo) then iprint("Data saved") else iprint("Error saving") end end addEventHandler("onPlayerQuit", getRootElement(), saveDataCharacter)
    1 point
  7. Your appeal was already denied in the past (https://forum.multitheftauto.com/topic/132396-ban-appeal/) and we have told you many times that the decision is final and cannot be changed. Also, you made quite a big story now with fantasy added into it (to deny the core of what you did) but it still won't change that the truth has already been determined, and that malicious people are being removed from MTA in order to protect others.. no matter the initial victim of your activities. The entire thing you got yourself into has nothing to do with "server ban vs global ban", we need to protect the entirety of MTA against some types of people, and this cannot be served without a full ban from our services No, as we have also said before, you don't. Now you can also stop evading forum bans, nothing is gonna change.
    1 point
  8. Hi. This is my new model that I want to share with you. I hope you like it ?
    1 point
  9. You can search on community website, I'm pretty sure there are a few gamemodes there Website: https://community.multitheftauto.com/ You can also make your own gamemode if you learn scripting Some tutorials: https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://forum.multitheftauto.com/topic/121619-lua-for-absolute-beginners/ https://www.youtube.com/watch?v=Goqj5knKLQM&list=PLY2OlbN3OoCgTGO7kzQfIKPj4tJbYOgSR You can find more just from a simple search on google
    1 point
  10. QUANDO ABRO O MTA , DA CL10 : ´HA UM PROCESSO DO GTA: San Andreas em execução. Ele precisa ser encerrado para que o MTA;SA seja iniciado. Voce deseja fazer isso agora?` ai eu aperto >Sim, ai aparece > ´Não foi possivel fechar o Gta: San Andreas. Se o problema persistir, por favor reinicie o seu computador.` mas eu reinicio mas da o mesmo erro me ajuda pls
    1 point
×
×
  • Create New...