-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
I don't have experience with XML. for _, resource in ipairs ( getResources() ) do if getResourceInfo ( resource,"type" ) == "map" then local resourceName = getResourceName ( resource ) local metaPath = ":"..resourceName.."/meta.xml" local meta = xmlLoadFile ( metaPath ) if meta then local children = xmlNodeGetChildren ( meta ) if children then for _, node in ipairs ( children ) do local nodeName = xmlNodeGetName ( node ) if nodeName == "file" then local song = xmlNodeGetAttribute ( node,"src" ) if string.find( song, ".mp3" ) or string.find ( song, ".wav" ) then xmlNodeSetAttribute ( node, "download", "false" ) end end end end xmlSaveFile ( meta ) xmlUnloadFile ( meta ) end end end Is it correct?
-
No, it will always returns false because the function callServerFunction doesn't return anything -> nil
-
Maybe it is under the ground. What about if you leave "z" instead of "z-1"?
-
I don't know if it works but you can try: guiSetProperty ( text, "MaxTextLength", "300" )
-
Another question, are the projectiles synced with the clients? Or I have to trigger server and then client?
-
Then, show us the part where it renders the names.
-
Lol, I didn't know that. haha. Thank you very much.
-
Hi all! I'm trying to do a shooter script but I have a problem with the projectile direction: function ejectProjectile() local localVehicle = getPedOccupiedVehicle(source) local ax, ay, az = getElementPosition(source) local x,y,z = getPositionFromElementOffset(localVehicle,0,5,0) local _, _, rz = getElementRotation(localVehicle) local vx, vy = x - ax, y - ay createProjectile(source, 19, x, y, z, 100, nil, 0, 0, 180 - rz, vx/3, vy/3, 0) -- I take velocity math here: viewtopic.php?p=357503#p357503 end The problem is that the projectile goes right(red arrow) and not straight(blue arrow) where it should go. I'm not good in math so if anybody can help me I will be very grateful . Thank you very much.
-
Two questions: *- Is there anyway to set an alpha value to the browser with webui? *-What does transparent value(createBrowser) do? Because I can't see the difference. And finally good work with CEF, it is awesome that you integrated it to mta 1.5. I can't wait anymore.
-
Intenta agregar esto en el script: setOcclusionsEnabled( false )
-
Works! Thank you very much.
-
But if I do: string.format("%02d:0%.1f", 0, 21.2) -> 00:021.2 And I want get 00:21.2 Thanks for helping me!
-
Hello! Can someone help me with my problem? I want to use string.format to get something like this: 00:00.2 but only I could get 00:0.2 with string.format("%02d:%.1f", 0, 0.2) Thanks!
-
You can make a script in mta that create a image's file and send the image to it via php
-
Lo agregue mientras estaba probando, no hace falta que armes tanto lío por algo que no afecta en nada. ¿Podrías publicar una foto con el recurso funcionando y el debugscript activo? Le dices a un pregunta tanto lio? No te estaba corrigiendo, solo preguntaba ya que se que tienes mas conocimientos que yo y tuve esa duda. De cualquier manera, no me saldre del tema, veo que lo estas ayudando asi que dejo el thread.
-
No es para nada dificil utilizar SQLite (no MySQL, parecido), checa la función executeSQLQuery
-
Te recomiendo usar smoothMoveCamera
-
Mira, si te soy sincero, no se utilizar las funciones XML o tengo muy poco conocimiento pero si te puedo dar una sugerencia es que yo, personalmente, usaria SQL, pienso que es mas efectivo.
-
En caso de que sean datos propios del cliente, me parece mas eficiente XML.
-
function player_Wasted (ammo, killer, weapon) if not killer or killer == source then outputChatBox(getPlayerName(source).." Se Ha Suicidado!", root,0,255,0,true) else outputChatBox(getPlayerName(killer).." Le partio el culo a "..getPlayerName(source).." con una ("..getWeaponNameFromID(weapon)..")", root,0,255,0,true) end end addEventHandler("onPlayerWasted", getRootElement(), player_Wasted)
-
if not joinData or joinData.status ~= 'fail' then -- if not joinData ?
-
function player_Wasted (ammo, killer, weapon) if not killer or killer == source then outputChatBox(getPlayerName(source).." Se Ha Suicidado!") else outputChatBox(getPlayerName(killer).." Le partio el culo a "..getPlayerName(source).." con una ("..getWeaponNameFromID(weapon)..")") end end addEventHandler("onPlayerWasted", getRootElement(), player_Wasted)
-
Puedes hacer otro xml y guardar el ultimo id al detener el recurso y utilizarlo cuando se inicie guardandolo en una variable. Lo del memo deberia reportarse en bugs.mtasa.com.