Leaderboard
Popular Content
Showing content with the highest reputation on 08/09/20 in all areas
-
Pra np++ eu não conheço. Eu também uso ele pra programar meus resources mas não utilizo autocompletar pra me forçar a aprender as sintaxes. Mas em outros editores de texto sei que tem.2 points
-
Please give my other comment a read, it went over how both alpha flags work. https://forum.multitheftauto.com/topic/127154-ajuda-textura-transparente-em-modelagem/?do=findComment&comment=9863091 point
-
The DFF and TXD provided looks fine. I think you'll be able to resolve the issue by enabling the alpha flag. You may also try changing the TXD compression to DXT5 or DXT1. Try DXT1 as last resort, as it does not support pixel transcluency, meaning the edges will be sharp.1 point
-
Hi Fernando, Can you please try enabling alphaTransparency in the model loading script: https://wiki.multitheftauto.com/wiki/EngineReplaceModel If possible, can you please attach files here? If the alphaTransparency flag doesn't resolve it, please try replacing ID 16445 and see if that works. It should. If this is the only solution, it'd be because this ID uses the appropriate IDE flags for alpha to render correctly. In MTA we can not set these flags yet, so only solution is replacing the models which has that ID, or use a HLSL shader to remake an alpha rendering system. You can find a full list of objects that have both alpha flags enabled, by CTRL F "List of model ID's that use the flag 68" at https://forum.multitheftauto.com/topic/121674-basics-of-vertex-color-and-alpha/.1 point
-
Hi and welcome to the forums, @Dadinho-157 Thread moved to Portuguese forum. https://forum.multitheftauto.com/forum/176-serviços-de-hospedagem/1 point
-
Na próxima vez, aguarde 48h antes de reviver seu tópico. Era mais fácil ter simplesmente colado o erro aqui em vez de ter o trabalho de upar uma imagem. No primeiro erro, ele está reclamando que a variável Imagens é booleana. (provavelmente false) No segundo erro, ele diz que não é possível comparar se false é menor que 10. O que eu sugiro que você faça, é trocar aquela linha 9 onde ele seta o valor de Imagens, para isso: Imagens = getElementData(getLocalPlayer(), "Imagens") or "0" Mas vale lembrar que a linha 15 (aparece na linha 12 que vc enviou) continuará dando erro se você não tiver a imagem "0.png" dentro da pasta "Portfolio".1 point
-
Cara, não recomendo que vc use pois ele buga em algumas sintaxes. Além disso sempre que o MTA atualizar e adicionar/remover funções, vc precisará ficar editando a linguagem manualmente.1 point
-
1 point
-
1 point
-
1 point
-
É simples o problema, não existe as funções getPlayerKills e getPlayerDeaths nativamente1 point
-
Teams = { { 'Grove Street' , 0, 128 , 0 , 'True' }, { 'Ballas' , 128, 0, 128 , 'True' }, { 'Vagos' , 255, 200, 0 , 'True' }, { 'Aztecas' , 0, 128, 255 , 'True' }, { 'Doctor' , 24, 198, 238 , 'True' }, { 'Police', 0, 0, 255 , 'True' }, { 'Criminal' , 255, 0, 0 , 'False' } } function OutPut ( aElement_ , aText_ ) exports['guimessages']:outputServer( aElement_, aText_ ) end executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aAccountss___ ( AccountName , AccountPassword , Serial , Year , Month , Day )' ) executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS SaveMoney ( Accont, Money )' ) addEventHandler( 'onPlayerQuit', root, function( ) local Account = getPlayerAccount( source ) if ( Account and isGuestAccount( Account ) ) then local SQL = executeSQLQuery( 'SELECT * FROM SaveMoney WHERE Accont = ? ', getAccountName( Account ) ) if ( SQL ~= -1 ) then executeSQLQuery( 'UPDATE SaveMoney SET Money = ? WHERE Accont = ? ', getElementData( source, 'Money' ), getAccountName( Account ) ) else executeSQLQuery ( 'INSERT INTO SaveMoney VALUES ( ? , ? )', getAccountName( Account ), getElementData( source, 'Money' ) ) end end end ) addEventHandler("onPlayerSpawn", root, function() local CriminalTeam = getTeamFromName("Criminal") if (CriminalTeam) then setTeamFriendlyFire(CriminalTeam, true) end end) for aTeams in ipairs ( Teams ) do aTeam_ = createTeam ( Teams[aTeams][1] , Teams[aTeams][2] , Teams[aTeams][3], Teams[aTeams][4] ) if ( Teams[aTeams][5] == 'True' ) then setTeamFriendlyFire ( aTeam_ , false ) end end1 point
-
1 point
-
Achei um código do @Lord Henry perdido pelo fórum, acho que seja útil pra você é tudo que você precisa 100% pronto basta só adaptar do jeito que você gostaria. server-side function recebeKills () local data = getAccounts () local accTable = {} local killsTable = {} local deathsTable = {} local killDeath = {} local kill = 0 local death = 0 if not data[1] then triggerClientEvent (client, "showRank", client) return end for i, acc in ipairs (data) do table.insert (accTable, getAccountName (data[i])) if not getAccountData (data[i], "kills") then table.insert (killsTable, "0") kill = 0 else table.insert (killsTable, tostring (getAccountData (data[i], "kills"))) kill = tonumber (getAccountData (data[i], "kills")) end if not getAccountData (data[i], "deaths") then table.insert (deathsTable, "0") death = 0 else table.insert (deathsTable, tostring (getAccountData (data[i], "deaths"))) death = tonumber (getAccountData (data[i], "deaths")) end if death == 0 and kill == 0 then table.insert (killDeath, 0) else table.insert (killDeath, kill / death) end end triggerClientEvent (client, "showRank", client, accTable, killsTable, deathsTable, killDeath) end addEvent ("getRank", true) addEventHandler ("getRank", getRootElement(), recebeKills) function salvaKills (ammo, killer, weapon, bodypart, stealth) if not isGuestAccount (getPlayerAccount(source)) then local deaths = getAccountData (getPlayerAccount(source), "deaths") if deaths then setAccountData (getPlayerAccount(source), "deaths", deaths + 1) else setAccountData (getPlayerAccount(source), "deaths", 1) end end if killer and killer ~= source then if getElementType (killer) == "player" then if not isGuestAccount (getPlayerAccount(killer)) then local kills = getAccountData (getPlayerAccount(killer), "kills") if kills then setAccountData (getPlayerAccount(killer), "kills", kills + 1) else setAccountData (getPlayerAccount(killer), "kills", 1) end end elseif getElementType (killer) == "vehicle" then killer = getVehicleController (killer) if killer then if not isGuestAccount (getPlayerAccount(killer)) then local kills = getAccountData (getPlayerAccount(killer), "kills") if kills then setAccountData (getPlayerAccount(killer), "kills", kills + 1) else setAccountData (getPlayerAccount(killer), "kills", 1) end end end end end end addEventHandler ("onPlayerWasted", getRootElement(), salvaKills) client-side scoreWindow = guiCreateWindow (0.3, 0.2, 0.4, 0.6, "Ranking Kills/Death (by: LordHenry)", true) scoreGrid = guiCreateGridList (0, 0.05, 1, 0.85, true, scoreWindow) guiWindowSetSizable (scoreWindow, false) guiGridListAddColumn (scoreGrid, "Account", 0.45) guiGridListAddColumn (scoreGrid, "Kills", 0.13) guiGridListAddColumn (scoreGrid, "Deaths", 0.13) guiGridListAddColumn (scoreGrid, "Ratio", 0.18) closeGrid = guiCreateButton (0.2, 0.91, 0.6, 0.09, "Fechar Painel", true, scoreWindow) guiSetVisible (scoreWindow, false) function scoreInfo (accounts, kills, deaths, ratio) guiSetVisible (scoreWindow, true) guiSetVisible (closeGrid, true) showCursor (true) if accounts then for i, v in ipairs (accounts) do guiGridListAddRow (scoreGrid, accounts[i], kills[i], deaths[i], ratio[i]) end end end addEvent ("showRank", true) addEventHandler ("showRank", getRootElement(), scoreInfo) function clickOptions (button, state, absoluteX, absoluteY) if button == "left" then if source == closeGrid then guiSetVisible (scoreWindow, false) showCursor (false) guiGridListClear (scoreGrid) end end end addEventHandler ("onClientGUIClick", getRootElement(), clickOptions) function sendScores () if not guiGetVisible (scoreWindow) then triggerServerEvent ("getRank", localPlayer) end end addCommandHandler ("rank", sendScores) Comando: /rank1 point
-
Com uma boa olhada na página da função getControlState é possível ver que ela agora é uma função server-side, e há uma semelhante para ser usada em client-side. Para que poupe seu tempo de ir para a wikipédia do MTA para ler especificamente sobre a função em relação ao seu problema, veja: Link útil: getPedControlState1 point
