Ernesto

Members
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Ernesto

  • Rank
    Square
  1. Pasa lo mismo, al respawnear el vehiculo no se respawnea el coche donde sali del vehiculo si no que donde se creo el vehiculo
  2. function autoparkeo(thePlayer, seat, jacked, player) if thePlayer and seat == 0 then local vehicle = getPedOccupiedVehicle( player ) if vehicle then local data = vehicles[ vehicle ] if data then if data.vehicleID < 0 then outputChatBox( "Tú vehículo temporal " .. data.vehicleID .. " (" .. getVehicleName( vehicle ) .. ") no puede ser parkeado.", player, 255, 0, 0 ) elseif ( data.characterID > 0 and exports.players:getCharacterID( player ) == data.characterID and exports.items:has ( player, 1, data.vehicleID ) ) or hasObjectPermissionTo( player, "command.spectate", false ) and not isVehicleJob [ getVehicleName ( vehicle ) ] then local x, y, z = getElementPosition( vehicle ) local rx, ry, rz = getVehicleRotation( vehicle ) local success, error = exports.sql:query_free( "UPDATE vehicles SET respawnPosX = " .. x .. ", respawnPosY = " .. y .. ", respawnPosZ = " .. z .. ", respawnRotX = " .. rx .. ", respawnRotY = " .. ry .. ", respawnRotZ = " .. rz .. ", respawnInterior = " .. getElementInterior( vehicle ) .. ", respawnDimension = " .. getElementDimension( vehicle ) .. " WHERE vehicleID = " .. data.vehicleID ) if success then setVehicleRespawnPosition( vehicle, x, y, z, rx, ry, rz ) data.respawnInterior = getElementInterior( vehicle ) data.respawnDimension = getElementDimension( vehicle ) saveVehicle( vehicle ) outputChatBox( "El vehículo " .. data.vehicleID .. " (" .. getVehicleName( vehicle ) .. ") fue parkeado.", player, 0, 255, 0 ) else outputChatBox( "Parkeo del vehículo fallido.", player, 255, 0, 0 ) end else outputChatBox( "No puedes parkear éste vehículo.", player, 255, 0, 0 ) end end else outputChatBox( "No estás conduciendo un coche.", player, 255, 0, 0 ) end end ) addEventHandler("onVehicleExit", getRootElement(), autoparkeo
  3. Esque al hacerlo no me funcciona me dice que no estoy en el vehiculo al salir. ¿Qué puede pasar?
  4. addCommandHandler( "park69", function( player, commandName ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then local data = vehicles[ vehicle ] if data then if data.vehicleID < 0 then elseif ( data.characterID > 0 and exports.players:getCharacterID( player ) == data.characterID and exports.items:has ( player, 1, data.vehicleID ) ) or hasObjectPermissionTo( player, "command.spectate", false ) and not isVehicleJob [ getVehicleName ( vehicle ) ] then local x, y, z = getElementPosition( vehicle ) local rx, ry, rz = getVehicleRotation( vehicle ) local success, error = exports.sql:query_free( "UPDATE vehicles SET respawnPosX = " .. x .. ", respawnPosY = " .. y .. ", respawnPosZ = " .. z .. ", respawnRotX = " .. rx .. ", respawnRotY = " .. ry .. ", respawnRotZ = " .. rz .. ", respawnInterior = " .. getElementInterior( vehicle ) .. ", respawnDimension = " .. getElementDimension( vehicle ) .. " WHERE vehicleID = " .. data.vehicleID ) if success then setVehicleRespawnPosition( vehicle, x, y, z, rx, ry, rz ) data.respawnInterior = getElementInterior( vehicle ) data.respawnDimension = getElementDimension( vehicle ) saveVehicle( vehicle ) else end else end end else end end ) Lo llevo intentando uno monton de días y no me sale. Gracias al que me responda y lo lea addCommandHandler( "park", function( player, commandName ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then local data = vehicles[ vehicle ] if data then if data.vehicleID < 0 then outputChatBox( "Tú vehículo temporal " .. data.vehicleID .. " (" .. getVehicleName( vehicle ) .. ") no puede ser parkeado.", player, 255, 0, 0 ) elseif ( data.characterID > 0 and exports.players:getCharacterID( player ) == data.characterID and exports.items:has ( player, 1, data.vehicleID ) ) or hasObjectPermissionTo( player, "command.spectate", false ) and not isVehicleJob [ getVehicleName ( vehicle ) ] then local x, y, z = getElementPosition( vehicle ) local rx, ry, rz = getVehicleRotation( vehicle ) local success, error = exports.sql:query_free( "UPDATE vehicles SET respawnPosX = " .. x .. ", respawnPosY = " .. y .. ", respawnPosZ = " .. z .. ", respawnRotX = " .. rx .. ", respawnRotY = " .. ry .. ", respawnRotZ = " .. rz .. ", respawnInterior = " .. getElementInterior( vehicle ) .. ", respawnDimension = " .. getElementDimension( vehicle ) .. " WHERE vehicleID = " .. data.vehicleID ) if success then setVehicleRespawnPosition( vehicle, x, y, z, rx, ry, rz ) data.respawnInterior = getElementInterior( vehicle ) data.respawnDimension = getElementDimension( vehicle ) saveVehicle( vehicle ) outputChatBox( "El vehículo " .. data.vehicleID .. " (" .. getVehicleName( vehicle ) .. ") fue parkeado.", player, 0, 255, 0 ) else outputChatBox( "Parkeo del vehículo fallido.", player, 255, 0, 0 ) end else outputChatBox( "No puedes parkear éste vehículo.", player, 255, 0, 0 ) end end else outputChatBox( "No estás conduciendo un coche.", player, 255, 0, 0 ) end end ) Este seria con outputbox
  5. Como puedo....

    ¿Como puedo poner a un grupo de ACL un elementdata osea el setElementData? Agradezco mucho la ayuda y gracias por leer el mensaje.
  6. Duda sobre un boton

    Seria posible hacer un boton diferente? en plan https://wiki.multitheftauto.com/wiki/Element/GUI/Button pero que se vea cuadrado? llevo intentandolo hacer mucho tiempo y no me sale en la GM de paradise
  7. [HELP] Problem whit something

    Well, my problem is that when you do a function, use a command and do the function that causes a small image to appear under the name of the label but in the event that the belt puts the image on my waist and the What can be the "error"? and thanks CLIENT The problem is : staffduty and cinturon SERVER : META: thx Aka Blue for the script
  8. Ayuda con Script

    No funcciona No funcciona ¿Otra posible solución?
  9. Ayuda con Script

    Bueno pues mi problema es que cuando hagas una funcion osea uses un comando y haga la funcion queria que salga una imagen pequeñita debajo del nametag pero al hacerlo en mi caso con el cinturon se me pone la imagen ami y a los demas ¿Cual puede ser el error? y gracias CLIENT : ( En este caso seria staffduty y cinturon ) SERVER : META : ( PD : Gracias Aka Blue Por El Resource )
  10. Help whit a function

    Same error, say You are not driving any car
  11. Help whit a function

    addEventHandler( "onVehicleStartExit", resourceRoot, function( player ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then local data = vehicles[ vehicle ] if data then if data.vehicleID < 0 then outputChatBox( "This temporal car " .. data.vehicleID .. " (" .. getVehicleName( vehicle ) .. ") can´t be parked.", player, 255, 0, 0 ) elseif ( data.characterID > 0 and exports.players:getCharacterID( player ) == data.characterID and exports.items:has ( player, 1, data.vehicleID ) ) or hasObjectPermissionTo( player, "command.addmap", false ) and not isVehicleJob [ getVehicleName ( vehicle ) ] then local x, y, z = getElementPosition( vehicle ) local rx, ry, rz = getVehicleRotation( vehicle ) local success, error = exports.sql:query_free( "UPDATE vehicles SET respawnPosX = " .. x .. ", respawnPosY = " .. y .. ", respawnPosZ = " .. z .. ", respawnRotX = " .. rx .. ", respawnRotY = " .. ry .. ", respawnRotZ = " .. rz .. ", respawnInterior = " .. getElementInterior( vehicle ) .. ", respawnDimension = " .. getElementDimension( vehicle ) .. " WHERE vehicleID = " .. data.vehicleID ) if success then setVehicleRespawnPosition( vehicle, x, y, z, rx, ry, rz ) data.respawnInterior = getElementInterior( vehicle ) data.respawnDimension = getElementDimension( vehicle ) saveVehicle( vehicle ) outputChatBox( "The car " .. data.vehicleID .. " (" .. getVehicleName( vehicle ) .. ") has been parked.", player, 0, 255, 0 ) else outputChatBox( "Parking Failed.", player, 255, 0, 0 ) end else outputChatBox( "You can´t park thiscar.", player, 255, 0, 0 ) end end else outputChatBox( "You are not driving any car.", player, 255, 0, 0 ) end end ) The same thing happens to me Any idea how to fix it? There is the function :
  12. Help whit a function

    how to make a mta function before leaving a car Because when leaving the car the function is late and it says that I am not in the car I mean using onVehicleExit
  13. Help whit a scripting Paradise

    How i can make new items in MTA PARADISE i have a problem because when i create a new item the icon its a star how i can make a new item? (Sorry for my english)
  14. Problem whit a script

    Why when i turn on my server all the scripts go on and work (the tables has been created of the other scripts) but of the resource vehicles they doesn´t LOG : ERROR: sql/layout.lua:91: Unable to create table vehicles [2018-02-14 17:11:22] INFO: Changed field fuelpoints.fuelpointID [2018-02-14 17:11:22] INFO: Changed field fuelpoints.posX [2018-02-14 17:11:22] INFO: Changed field fuelpoints.posY [2018-02-14 17:11:22] INFO: Changed field fuelpoints.posZ [2018-02-14 17:11:22] INFO: Changed field fuelpoints.name [2018-02-14 17:11:22] Start up of resource vehicles cancelled by script [2018-02-14 17:11:22] Stopping vehicles
  15. But i have the modules.