-
Posts
3,875 -
Joined
-
Days Won
67
Everything posted by DNL291
-
Ajuda a criar Marker de destruir Veiculo
DNL291 replied to ytjuliocesar's topic in Programação em Lua
O elemento-veículo deve ser armazenado na tabela Veh e não tem nenhum createVehicle nesse código. -
Já mostrei o que você precisa, você não entendeu com clareza por que não entende nada de scripting. Se quiser código pronto com mais clareza está aqui:
-
The cursor can be "hidden" with this function: setCursorAlpha But I believe you meant defocusing a selected/clicked edit-box, so you'll need this function: https://wiki.multitheftauto.com/wiki/GuiBlur
-
Com este evento: onClientChatMessage + cancelEvent e verificando o parâmetro text, que é a mensagem.
-
The event will be triggered for all server markers and not just for 'marker'. Here's an version indented and more cleaner: function work( element ) if element == localPlayer then triggerServerEvent( "setAnim", localPlayer ) end end addEventHandler( "onClientMarkerHit", marker, work ) server function setAnim() setPedAnimation( client, ... ) local obj = createObject ( id, x, y, z, 0, 0, 0 ) exports.bone_attach:attachElementToBone( obj, client, 4, 0, 0.4, - 0.6, -90, 0, 0 ) end addEvent("setAnim", true) addEventHandler("setAnim", root, setAnim)
-
Como ter 2 carros diferentes na mesma dff ao mesmo tempo
DNL291 replied to Tec's topic in Programação em Lua
Substituindo as texturas com uma TXD/DFF modificada. engineLoadTXD - veja o primeiro exemplo na página. -
Como ter 2 carros diferentes na mesma dff ao mesmo tempo
DNL291 replied to Tec's topic in Programação em Lua
@Tec Não precisa refazer o mesmo tópico quando for postado num local errado. O moderador pode movê-lo para o sub-fórum correto. -
Uma maneira ainda mais efetiva é utilizar getResourceGUIElement - cuja variável predefinida é guiRoot. Ex: addEventHandler ("onClientGUIClick", guiRoot, functionQualquer) -- Sem declarar o botão e sem o false. É um hábito que todos que buscam otimizar seus scripts devem ter. root (getRootElement()) sempre deve ser evitado quando possível.
-
Ajuda no voice
DNL291 replied to Jackdolirol021's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
O voice do MTA não trabalha localmente se não estou errado. Use este voice: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14281 -
Try reinstalling a stable version from mtasa.com, I had a similar problem and fixed it this way. If it doesn't help then your issue is another.
-
"backspace" only works for the "onClientKey" event, my bad. In this case, add this event for the "backspace" key and it should work.
-
Você pode fazer com php SDK. Pesquisando pelo fórum talvez você encontre algo relacionado. Veja também a função callRemote.
-
local text = "" addEventHandler( "onClientCharacter", root, function ( character ) if character == "backspace" then text = text:sub( 1, -2 ) else text = text .. character end end )
-
It would be useful if you explain what this code is supposed to do. What do you want to do besides simplify the calculation?
-
Yes, basically you will keep stored on server-side the fetchRemote files (a reference to the name/directory, not the file itself), and determine which files should be transferred by triggering server >> client and vice versa, then send it (triggerLatentClientEvent > fileCreate/etc ...).
-
The resource is not automatically updated when you modify the meta.xml file, the change only takes effect by restarting the resource. I wonder what exactly do you want to do, I mean, will it really be necessary adding each file in meta.xml? I suggest you using triggerLatentClientEvent instead, since it will transfer a large amount of data thus generating a high network traffic. Since you're already sending the file raw data to the client, you can do this in another way, and not having to worry about add each file to the meta.xml. You can use fileCreate/write/close client-side instead of downloadFile. You'll also need to check if the file already exists in the client's cache folder.
-
onClientCharacter Example: local text = "" addEventHandler( "onClientCharacter", root, function ( character ) text = text .. character end )
-
You'll need to create a file with the received data. For that use fileCreate, fileWrite, fileClose. PS: Your link isn't working.
-
Okay. Sharing here how you fixed it may be useful for some forum users, remember that ?
-
You should edit the resource to check for the ACL acess and then open the panel. Btw, I realized now that the source code is compiled, in this case you're not able to add that function there.