-
Posts
80 -
Joined
-
Last visited
Posts posted by Motar2k
-
-
18 hours ago, djantony said:
como puedo ver el usuario y contraseña de mis usuarios ?? como lo ago soy nuevo en esto
La contraseña no puedes verla ya que se encuentra hasheada, ahi mismo en el internal.db se encuentran esos datos.
Tambien puedes obtener las cuentas mediante la funcion getAccounts()
-
2 hours ago, Svartskogen said:
Buenas recien me estoy metiendo en la programacion en MTA con Lua y vengo acostumbrado a usar C# en el cual puedo ver todos los objetos (clases, metodos, interfaces) de las librerias con las que estoy trabajando (como por ejemplo en unity, el autocompletar te ayuda a recordar el nombre de las funciones asi como te deja navegar en las diversas opciones).
Mi pregunta es si existe algo similar para obtener una experiencia similar en Lua con MTA? uso visual studio code.
Te recomiendo sublime text, ya que para este existen herramientas creadas por usuarios de la plataforma, por ejemplo el autocompletado que mencionas.
@Svartskogensi te animas a usarlo aqui te dejo el link de la extencion:
-
32 minutes ago, Kateeh said:
Basicamente les explico brevemente mas que nada, al poner /createint y con la sintaxis totalmente correcta me lanza MySQL query error, y la verdad no entiendo que pasa, ya borre la tabla y reinicie el script una y otra vez, probe el de mabako y si funciona, pero quiero el de downtown
@Kateeh Que error sale exactamente?
-
6 hours ago, Fed3x_xD said:
español
Hola, inicie un seridor con un amigo y tenemos un problema con los markets, cuando un jugador entra a uno se le aparece el cartel a todos los demas jugadores (Por ejemplo: Un jugador entra al market del job de pizzero a todos los demas jugadores les salta el cartel para tomar el trabajo esten donde esten).
Seria genial si alguien nos ayudase ya que si no lo solucionamos nos vamos a ver obligados a cerrar el servidor y no queremos eso, desde ya muchas gracias aqui dejo mi discord: Fede#7027
português
Olá, comece um seridor com um amigo e temos um problema com os mercados. Quando um jogador entra em um, o pôster aparece para todos os outros jogadores (por exemplo: Um jogador entra no mercado de pizza para todos os outros jogadores. pule o pôster para aceitar o trabalho onde quer que esteja). Seria ótimo se alguém nos ajudasse, porque se não resolvermos, seremos forçados a fechar o servidor e não queremos isso, muito obrigado aqui deixo minha discórdia: Fede # 7027
english
Hello, start a serer with a friend and we have a problem with the markets, when a player enters one, the poster appears to all the other players (For example: A player enters the pizza job market to all the other players skip the poster to take the job wherever they are). It would be great if someone helped us because if we do not solve it we will be forced to close the server and we do not want that, thank you very much here I leave my discord: Fede # 7027
Que tal @Fed3x_xD nececito mas detalles para poder ayudar, el EVENTO que "avisa" cuando un jugador choca con un marcador, se encuentra en clientside o serverside? si desconoces estos datos revisa el meta.xml de tu resource y ahi saldra el nombre del archivo y su tipo.
-
On 30/05/2020 at 20:37, AaroN⍩ said:
Para evitar el Spam podrias utilizar un SetTimer asi solo le permitira crear un auto cada determinado tiempo.
No es recomendable, ya que de igual manera eso no evitar el spamneo de autos.
-
2 hours ago, iann said:
hola, como saco la opcion de resources, a los que tienen smoderados y mod??
Que tal @iann en la lista de ACL del admin panel estan los permisos de cada grupo en el ACL, ahi puedes modificarlos
-
On 22/05/2020 at 16:35, Jakepankeke said:
Hola chicos, cuanto tiempo he vuelto al MTA en lo que continua esta cosa mundial y pensaba agilizar mi mente con algunas cosas de script y eso para variar.
Estoy tratando de hacer un sistema de fogatas personales pero estoy usando el sistema de luces dinámicas del usuario Ren712
https://community.multitheftauto.com/index.php?p=resources&s=details&id=9398 (link del resource que estoy usando - si, estoy usando la versión descontinuada)
El punto es que debe crearse un objeto y en el se crea una luz (de la cual solo se usa en cliente). Pero al momento de usarlo con 2 personas la luz se crea en la ultima persona que la usó. No estoy seguro que podrida hacer exactamente
¿Me podrían aconsejar?
Server
addEvent("Inventario.use.id.8", true) addEventHandler("Inventario.use.id.8",root, function() local fuegostat = getElementData (source, "Fuegocampana") if fuegostat and isElement(fuegostat) then destroyElement (fuegostat) end triggerClientEvent ( "Inventario.use.id.8.c",source) local x, y, z = getElementPosition(source) local rx, ry, rz = getElementRotation(source) fuegoobjet = createObject(3524, x, y, z-2.5, 0, 0, rz) --1423 setElementAlpha(fuegoobjet,0) setElementData (source, "Fuegocampana", fuegoobjet) end)
Cliente
addEvent("Inventario.use.id.8.c", true) addEventHandler("Inventario.use.id.8.c",root, function() local x, y, z = getElementPosition(localPlayer) local rx, ry, rz = getElementRotation(localPlayer) local fuegostatluzc = getElementData (localPlayer, "Fuegocampanaluz") if fuegostatluzc and isElement(fuegostatluzc) then exports.dynamic_lighting:destroyLight(fuegoluz) end fuegoluz = exports.dynamic_lighting:createPointLight( x, y, z, 0.8, 0.6, 0.5, 2, 10, true) setElementData (localPlayer, "Fuegocampanaluz", fuegoluz) end)
Me olvide poner el titulo, que listo de mi en verdad...
El problema esta en que creas la luz con la misma variable, entonces cuando se crea otra se destruye la anterior y se crea una nueva
Revisa este otro post para que te des una IDEA de como crear una "variable" para cada jugador -
On 20/05/2020 at 17:45, Raxzen said:
Trate de acomodar tu código, y me sirvió la parte del warped intovehicle xd, pero con unas ligeras modificaciones, a pesar de eso trate de aplicar la finción para evitar que el usuario spawnee mas de un auto, pero no e tenido resultado, alguna otra forma de orientar
No se arreglo lo de spawnear mas de auto?
-
Apparently you call the function but some error occurs, verify that the arguments you send to the function "mysql: insert" function are correct
-
-
@Raxzen Que tal, modifique tu codigo del serverside, el codigo no esta probado.
--serverside local vehiculos = {} function generar_auto(vehiculo,posx,posy,posz,player) if vehiculo and posx and posy and posz then if not vehiculos[player] or not isElement(vehiculos[player]) then vehiculos[player] = createVehicle(vehiculo,posx,posy,posz) outputChatBox("Auto creado",source) else outputChatBox("Ya tienes un auto", source) end end end addEventHandler("onPlayerQuit", getRootElement(), function() if vehiculos[player] and isElement(vehiculos[player]) then destroyElement(vehiculos[player]) vehiculos[player] = nil end end)
-
-
On 09/04/2020 at 17:48, Martin786843 said:
No se si estara bien (soy nuevo haciendo esto) solo quiero agregar el misil tipo busqueda de calor al shamal y queria ver si esta bien asi : (cuando termine de leer ese script que es el de ejemplo) y iba a preguntar si esto estara bien o tiene que ir con un Xml
- function shootProjectile()
- local vehicle = getPedOccupiedVehicle(localPlayer)
- -- Only create projectile if we are inside a vehicle
- if(vehicle)then
- local x, y, z = getElementPosition( Shamal)
- createProjectile( Shamal , 19, x, y, z)
- end
- end
- bindKey("vehicle_fire", "down", shootProjectile)
La funcion vehicle_fire no se si funciona para todos los vehiculos, pero al parecer estas creando un proyectil en la posicion del shamal, pero no estas asignando un destino, prueba jugar con los argumentos de la funcion, en lo que ami respecta se ve bien
-
@DaeRoNz Fixed by thisdp try again
Renember use command: updatedgs
-
How can I get the bass from a sound.
I understand that I have to use getSoundFFTData, but how can I apply it. -
2 minutes ago, iwalidza said:
its not work with me and i need code not tool
or any helpthe resource is not compiled, you can check the code and adapt it on your server
-
No esta testado
hojillas = {}; cigarros = {}; timers = {}; function crearHojilla(player) if not isPedInVehicle(player) then if getElementData(player, "hojillas") and hojillas[player] == nil and cigarros[player] == nil then hojillas[player] = createObject(model,x,y,z);--creando objeto y almacenandolo bindKey(player, "F","down", crearCigarro);--creando bind para llamar funcion crearCigarro bindKey(player, "X","down", pararWeed);--creando bind para llamar funcion pararWeed end end end addCommandHandler("crearHojilla", crearHojilla) function crearCigarro(player) if not isPedInVehicle(player) then if getElementData(player, "hojillas") and getElementData(player, "bolsitaweed") then destroyElement(hojillas[player])--destruyendo hojilla cigarros[player] = createObject(model,x,y,z);--creando cigarro unbindKey(player, "F","down", crearCigarro);--quitando bind de crearCigarro bindKey(player, "F","down", fumarCigarro);--creando bind para llamar funcion fumarCigarro end end end function fumarCigarro(player) --codigo al fumar removeElementData(player, "hojillas")--quitando hojilla removeElementData(player, "bolsitaweed")--quitando bolsitaweed end function pararWeed(player) if hojillas[player] and isElement(hojillas[player]) then destroyElement(hojillas[player]); hojillas[player] = nil; end if cigarros[player] and isElement(cigarros[player]) then destroyElement(cigarros[player]); cigarros[player] = nil; end unbindKey(player, "F","down", crearCigarro); unbindKey(player, "X","down", pararWeed); end
-
-
-
21 hours ago, sthprk said:
nop, sigue sin andar ya intenté todo ,pegaria la biblia de comentadas de codigo que tengo pero :s , y el ejemplo de la wiki no hizo mas que confundirme
lo cambié asi pero no anda tampoco xd
function starthojillas1 ( thePlayer )
setElementData ( thePlayer, "hojillas1", getElementData ( thePlayer, "hojillas1" ) )
--if hojillas1[thePlayer] == nil and not getElementData ( thePlayer, "bolsitaweed" ) and not isTimer(cooldowns[thePlayer]) then
-- Activar las funciones con una tecla usando bindkey
--bindKey( thePlayer, "F","down", "fumarmariguanadmps" )
--bindKey( thePlayer, "num_sub","down", "stophojillas1" )
--cooldowns[thePlayer] = setTimer( function() end, 3000, 1 )
if (getElementData(thePlayer,"hojillas1") == true and getElementData(thePlayer,"bolsitaweed") then---------------------------------------------------------
getElementData(thePlayer, "bolsitaweed", true)
bindKey (thePlayer, "F","down", "fumarmariguanadmps")
print("con weed ")
else
if getElementData(thePlayer,"hojillas1") == true and not getElementData(thePlayer,"bolsitaweed") then-----------------------------------------------------
getElementData(thePlayer, "bolsitaweed", false)
unbindKey (thePlayer, "F","down", "fumarmariguanadmps")
print("sin weed ")
end
end
Te hare uno y tu lo adaptas a tu servidor
Quieres que al usar un cmd se cree una hojilla, despues con un bindkey crear el cigarro sin embargo para que esto suceda necesitas tener weed.
Solo confirma si es correcto para mandar el codigo.
-
16 hours ago, RTJGSTAR said:
Hola buenas querida comunidad, bien explico lo que me sucede, tengo una gm Paradise (Dallas) el cual al intentar prender la consola (MTA Server.exe) Me arroja el siguiente error.
ERROR: players\main.Lua:282: exports: Call to non-running server resource (sql) [string "?"] [DUP x8]
Closing SQLite3 databaseLo cual no se a que se debe, pero me gustaría solucionarlo, Soy nuevo en la comunidad de Mta, se script pero no mucho, y quiero realizar un gm de rp con base de paradise, me gustaria alguna respuesta lo antes posible, muchas gracias, quedo atento.
El error se entiende como: no se pudo llamar al resource sql.
Ya que no esta el resource iniciado o contiene errores que impiden que inicie correctamente.
- 1
-
11 hours ago, MatiMTA said:
I put this on the client side:
function setTheObjectUnbreakable(object) setObjectBreakable(object,false) end addEvent("setTheObjectUnbreakable",true) addEventHandler("setTheObjectUnbreakable",root,setTheObjectUnbreakable)
And this in the server-side:
-- I created an object like this local tOb = createObject(ob['model'], ob['x'], ob['y'], ob['z'], ob['rx'], ob['ry'], ob['rz']) -- setTimer(function() if ob['health'] > 0 then triggerClientEvent("setTheObjectUnbreakable",root,tOb) end end,1000,1,tOb)
But this doesn't work. Where is the problem?
I dont see errors
Why don't you call the function after the object is created?
-
The resources are probably named the same as on the other servers, this would cause the data to overlap
-
1 hour ago, MatiMTA said:
Hello, I made a script wich creates an object with some properties.
The problem is when I crash my car with the object, the object breaks.
It breaks like a fence.
There is some function to make the object invincible to car crashes? I created the object in server-side.
Thanks.
You need use this https://wiki.multitheftauto.com/wiki/SetObjectBreakable
but is only for clientside for this use triggerClientEvent
Integrar servidor de mtas a con discord
in Scripting
Posted