Jump to content

Ernesto

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by Ernesto

  1. I'm starting to create a server and I take the paradise GM and I want to avoid multi-accounts, it is possible to make that in paradise login you can only have one account per serial?
  2. Si sigues necestiando ayuda mandame mensaje privado.
  3. local blips = { } local ref = { } addCommandHandler ( "ref", function ( player ) local x, y, z = getElementPosition ( player ) local city = getZoneName ( x, y, z ) local ref = ref [ player ] local blip = blips [ player ] if exports.factions:isPlayerInFaction ( player, 1 ) then getPolicias ( ) if ref == false or ref == nil then exports.chat:me ( player, "pide refuerzos por su radio." ) for i=1, #policias do local value = policias [ i ] blips [ player ] = createBlipAttachedTo ( player, 0, 3, 255, 255, 0 ) setElementVisibleTo ( blips [ player ], root, false ) setElementVisibleTo ( blips [ player ], value, true ) end exports.factions:sendMessageToFaction ( 1, "El compañero "..getPlayerName (player).." ha pedido refuerzos en "..city..". Punto marcado en el GPS.", 255, 255, 0 ) ref[ player ] = true else if isElement ( blip ) then destroyElement ( blip ) end exports.chat:me ( player, "cancela los refuerzos por su radio." ) exports.factions:sendMessageToFaction ( 1, "El compañero "..getPlayerName (player).." ha cancelado los refuerzos.", 255, 255, 0 ) ref[ player ] = false end end end ) ¿Donde podria estar el error?, al usar /ref , marca donde esta la persona pero cuando lo vuelvo a poner /ref no se quita el blip sino que pide refuerzos denuevo.
  4. ¿Donde puede estar el error?, al hacerlo siguen pudiendo crear varias cuentas con el mismo serial
  5. addCommandHandler( { "staff", "admins" }, function( player, commandName, ... ) if exports.players:isLoggedIn( player ) then outputChatBox( "Administración online: ", player, 255, 255, 0 ) local count = 0 for key, value in ipairs( getElementsByType( "player" ) ) do local accountname = getAccountName(getPlayerAccount(thePlayer)) local groups = exports.players:getGroups( value ) if groups and #groups >= 1 then local title = containsRank (groups, "Desarrollador") or containsRank ( groups, "Sub-Desarrollador" ) or containsRank ( groups, "Administrador" ) or containsRank( groups, "Moderador" ) or containsRank( groups, "GameOperator" ) or containsRank (groups, "Helper") if title then local duty = exports.players:getOption( value, "staffduty" ) outputChatBox( " [ID " .. exports.players:getID( value ) .. "|" .. accountname( thePlayer ) .. "] " .. title .. " " .. getPlayerName( value ):gsub( "_", " " ) .. ( duty and " - disponible" or " - ocupado" ), player, duty and 0 or 255, 255, duty and 0 or 255 ) count = count + 1 end end end if count == 0 then outputChatBox( " Ninguno. Si ha pasado algo importante haz un screenshot y informa a un staff cuando este conectado.", player, 255, 255, 91 ) end end end ) Bueno el problema es que quiero que cuando pongan /staff salga el usuario del admin pero cuando lo consigo solo me sale el mio
  6. YA pero esque no se como hacer un boton DX funccional a ver si se pero en el script GUI de paradise en contreto porque al hacerlo deja de funccionar todo el .lua modificado
  7. elseif window.type == "button" then local line_height = line_height * 2 - 4 if not window.button then window.button = guiCreateButton ( x + width / 4, y + 3, width / 2, line_height - 4, tostring( window.text ), false ) ---- Aqui es donde ponerlo osea que este aqui encima, lo llevo intentando un buen rato y no me sale addEventHandler( "onClientElementDestroy", window.button, function( ) window.button = nil end, false ) if window.onClick then addEventHandler( "onClientGUIClick", window.button, function( button, state ) if state == "up" then if button == "left" then window.onClick( 1 ) elseif button == "right" then window.onClick( 2 ) end end end, false ) end if window.id then destroy[ window.id ] = window.button else table.insert( destroy, window.button ) end else local bx, by = guiGetPosition( window.button, false ) if by ~= y + 3 then guiSetPosition( window.button, bx, y + 3, false ) end end y = y + line_height Llevo intentandolo un buen tiempo y no me sale, lo que hace es que desaparezca el boton funccional (ESTO VIENE DE PARADISE) (El resource GUI)
  8. Pasa lo mismo, al respawnear el vehiculo no se respawnea el coche donde sali del vehiculo si no que donde se creo el vehiculo
  9. 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
  10. Esque al hacerlo no me funcciona me dice que no estoy en el vehiculo al salir. ¿Qué puede pasar?
  11. 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
  12. ¿Como puedo poner a un grupo de ACL un elementdata osea el setElementData? Agradezco mucho la ayuda y gracias por leer el mensaje.
  13. 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
  14. 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
  15. No funcciona No funcciona ¿Otra posible solución?
  16. 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 )
  17. Same error, say You are not driving any car
  18. 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 :
  19. 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
  20. 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)
  21. 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
  22. Well I have a problem and I want to open a server but the problem is that when I put mysql (the data is well set) when I open the server it says [15:56:15] ERROR: mysql / connection.lua: 62: attempt to call global 'mysql_ping' (to nil value) [15:56:15] ERROR: global / money_globals.lua: 26: call: failed to call 'mysql: query' [string "?"] [15:56:15] ERROR: mysql / connection.lua: 62: attempt to call global 'mysql_ping' (to nil value) [15:56:15] ERROR: global / money_globals.lua: 37: call: failed to call 'mysql: query' [string "?"] and in the other server it only says: Call to non-running server resource (mysql) [string " ? "] I really appreciate the help if someone helps me and will fulfill my dreams Thanks for read. -Ernesto
×
×
  • Create New...