Jump to content

Killer...

Members
  • Posts

    35
  • Joined

  • Last visited

Details

  • Gang
    left

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Killer...'s Achievements

Rat

Rat (9/54)

0

Reputation

  1. Please, explain better you error. Because my english level is not very good.
  2. This is the problem, i don't know where in the script does appear the problem.
  3. When i log in, there's no problem. But when other players try to enter, the screen remains black whitout charging anything. Please help. And when i reconnect the problem apply me to.
  4. Thanks man, i put it on the addEventHandler("onResourceStart", resourceRoot, function() aclReload() connection = dbConnect( "mysql", "dbname=tlvrp;host=localhost;unix_socket=/var/lib/mysql/mysql.sock", "tlvrp", "gabriel32", "share=1" ) if (not connection) then outputServerLog("Error: MySQL connection is not established!") else outputServerLog("Notice: MySQL connection is established!") testSQLConnection() end setTimer(function() reconnectSQL() end, 60000*5, 0) for i,v in ipairs(getElementsByType("player")) do if (isClientInTutorial(v)) then local x, y, z = tonumber(getElementData(v, "roleplay:temp.x")), tonumber(getElementData(v, "roleplay:temp.y")), tonumber(getElementData(v, "roleplay:temp.z")) setElementPosition(v, x, y, z) setElementInterior(v, 0) setElementDimension(v, 0) setCameraTarget(v, v) setElementRotation(v, 0, 0, 90) setElementFrozen(v, false) setElementData(v, "roleplay:accounts.state", 2, true) removeElementData(v, "roleplay:temp.md5rofl") removeElementData(v, "roleplay:temp.x") removeElementData(v, "roleplay:temp.y") removeElementData(v, "roleplay:temp.z") setElementData(v, "roleplay:accounts.option3", 1, false) dbExec(connection, "UPDATE `??` SET `??` = '??' WHERE `??` = '??'", "accounts", "option_3", 1, "id", getAccountID(v)) toggleAllControls(v, true, true, true) end end end ) Because after i used the test mysql. Thanks Men
  5. Nope same problem. [12:05:53] ERROR: roleplay-accounts/s_accounts.lua:175: dbConnect failed; Can't connect to local MySQL server through socket '' (111)
  6. function testSQLConnection() if (connection) then local query = dbQuery(connection, "SELECT `??` FROM `??` WHERE `??` = '??' LIMIT 1", "value", "config", "key", "motd") if (query) then local result, num_affected_rows, errmsg = dbPoll(query, -1) if (num_affected_rows > 0) and (type(result) == "table") then for result,row in pairs(result) do if (row["value"]) then outputServerLog("Notice: Connection is working!") g_motd = row["value"] end end else outputServerLog("Error: MySQL query failed.") end else outputServerLog("Error: MySQL query failed.") end else outputServerLog("Error: Could not test the query connection due to no stable MySQL connection.") outputServerLog("... attempting a repair ...") test_db = dbConnect( "mysql", "dbname=tlvrp;host=localhost;unix_socket=/var/lib/mysql/mysql.sock", "tlvrp", "gabriel32", "share=1" ) if (not connection) then outputServerLog("... repair failed!") else outputServerLog("... repair successful!") end end end The error is the same
  7. Hello Everyone, i need your help. Im doing an MTA Fairplay server and...when i uplodaded it to the VPS, it tell's my this error. [2015-03-07 11:21:30] ERROR: roleplay-accounts/s_accounts.lua:174: dbConnect failed; Can't connect to local MySQL server through socket '' (111) [2015-03-07 11:21:30] Error: MySQL connection is not established! [2015-03-07 11:21:30] ERROR: roleplay-accounts/s_webserver.lua:85: dbConnect failed; Can't connect to local MySQL server through socket '' (111) [2015-03-07 11:21:30] Error: MySQL web_connection is not established! And i went to the script of s_accounts.lua:174 and s_webserver.lua:85, but there's no space por put the socket or something. Please help.
  8. 1º-. Si publicas un código porfavor usa el botón lua. Y pon el script para entre [.lua][./lua] ((Sin puntos)). 2º-. ¿Qué GM estás usando? Ya que eso me parece a MTA Paradise, y lo que tu has hecho está bastante más complejo. Añademe a Skype, y te ayudaré sin problemas. "killer.68x".
  9. Problem, with FairPlay, please help im using an Centos 6,6 86x_64. Please help. Problem: Register: Roleplay.0400840 registered a new account as Vladknovh [19:56:52] WARNING: roleplay-accounts\s_accounts.lua:331: dbExec failed; (1364) Field 'admin_level' doesn't have a default value
  10. Hello everybody. I was working on a system for plant and take maria. But there's problems that i don't know how to resolve, because that i'm doing this post. Here's the error: [2015-02-22 16:45:52] SCRIPT ERROR: drogas\s.lua:385: syntax error near 'setElementData' [2015-02-22 16:45:52] ERROR: Loading script failed: drogas\s.lua:385: syntax error near 'setElementData' And here's the system for plant. function plantarr( thePlayer, command) local semillas = getElementData(thePlayer, "semillas") local pjid = exports.players:getCharacterID( source ) local x,y,z = getElementPosition ( thePlayer ) if tonumber(semillas) <= semillas then if tonumber(semilla) <= semillas then if semillas >= 2 then exports.chat:me (thePlayer, "termina de plantar una planta de marihuana.") local plantaObject = createObject (3409, x, y, z -3.25) --Crear Objeto local aquitar = getElementData (player, "semillas" ) - 2(semillas) setElementData ( source, "semillas", aquitar ) setElementData ( source, "semillas", semillas ) setElementData ( source, "planta", plantaObject) exports.sql:query_free('UPDATE characters SET semillas = '.. aquitar ..' WHERE characterID = '..pjid) end else outputChatBox("((No tienes suficientes semillas))", source, 255, 0, 43) end end end addCommandHandler ( "plantar", plantarr ) And there's the system for take it, i don't know if it have any error but i put it here, if you can revise it and say me if it's good i will thank you, if you don't know, i will thank you too function cosecharr( thePlayer, command ) local semillas = getElementData(thePlayer, "semillas") local planta = getElementData ( source, "planta") local pjid = exports.players:getCharacterID( source ) x1, y1, z1 = getElementPosition ( thePlayer ) x2, y2, z2 = getElementPosition ( planta ) distance = getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) if ( distance < 2) then setPedAnimation (thePlayer, "BOMBER", "BOM_Plant", 4000) exports.chat:me (thePlayer, "arranca la planta y la mete en una bolsa.") exports.chat:ame (thePlayer, "Cosechó 5 gramos de marihuana.") exports.chat:ame (thePlayer, "Ya no queda rastro de la planta.") destroyElement ( planta ) setElementData ( source, "maria", maria ) local adar = getElementData ( player, "maria" ) + 5(maria) exports.sql:query_free('UPDATE characters SET maria = '.. adar ..' WHERE characterID = '..pjid) else outputChatBox("((Tienes que estar cerca de una planta para cosecharla))", source, 255, 0, 43) end end addCommandHandler ("cosechar", cosecharr) Thanks for watch my post, and try to help. Thanks to everybody, have a good Sunday.
  11. Hello everyone, i write this post because i need help whit the interior system of MTA Paradise, the problem it's that the vehicles when enter's in an interior get's the engine damaged. Here's the script. if isPedInVehicle ( player ) and getPedOccupiedVehicleSeat( player ) == 0 then vehicle = getPedOccupiedVehicle ( player ) setVehicleFrozen ( vehicle, true ) setVehicleDamageProof( vehicle, false ) setElementCollisionsEnabled( vehicle, false) for i = 0, getVehicleMaxPassengers( vehicle ) do local passag = getVehicleOccupant( vehicle, i ) if passag then setElementDimension( passag, getElementDimension( other ) ) setElementInterior( passag, getElementInterior( other ) ) setCameraInterior( passag, getElementInterior( other ) ) setElementPosition( passag, getElementPosition( other ) ) setCameraTarget( passag, passag ) end end setVehicleFrozen ( vehicle, true ) setVehicleDamageProof( vehicle, true ) setElementDimension( vehicle, getElementDimension( other ) ) setElementInterior( vehicle, getElementInterior( other ) ) setElementPosition( vehicle, getElementPosition( other ) ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) setVehicleDamageProof( vehicle, false ) setVehicleFrozen ( vehicle, false ) setElementCollisionsEnabled( vehicle, true) elseif isPedInVehicle ( player ) and not getPedOccupiedVehicleSeat( player ) == 0 then setVehicleFrozen ( vehicle, true ) setVehicleDamageProof( vehicle, true ) setElementCollisionsEnabled( vehicle, false) removePedFromVehicle( player ) setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other ) ) setCameraTarget( player, player ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) setVehicleFrozen ( vehicle, false ) setVehicleDamageProof( vehicle, true ) setElementCollisionsEnabled( vehicle, true) else setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other ) ) setCameraTarget( player, player ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) end end end end end Please help, and thanks for watch.
  12. Hi everyone i have been scripting an Marihuana system for MTA Paradise, and show's me some errors. These are the errors: [2015-02-14 15:21:05] WARNING: drogas\s.lua:363: Bad argument @ 'setElementData' [Expected element at argument 1, got nil] [2015-02-14 15:21:05] ERROR: drogas\s.lua:364: call: failed to call 'players:takemaria' [string "?"] [2015-02-14 15:21:05] ERROR: drogas\s.lua:365: attempt to concatenate local 'pjid' (a boolean value) And this is the script for plant the marihuana: function plantar ( thePlayer, command) local maria = getElementData(thePlayer, "maria") local pjid = exports.players:getCharacterID( source ) local x,y,z = getElementPosition ( thePlayer ) planta = createObject (3409, x, y, z) if maria >= 2 then if ( planta ) then -- if it was created outputChatBox("((Has plantado una planta de marihuana))", source, 0, 0, 255 ) setElementData ( source, "maria", maria ) exports.players:takemaria( source, 2 ) exports.sql:query_free('UPDATE characters SET maria = 5 WHERE characterID = '..pjid) setTimer ( plantac, 1000, 1) setTimer ( planta1, 2000, 1) setTimer ( planta2, 4000, 1) setTimer ( planta3, 6000, 1) setTimer ( planta4, 10000, 1) end else outputChatBox("((No tienes suficiente marihuana para poder plantar una planta de marihuana))", source, 0, 0, 255) end end addCommandHandler ( "plantar", plantar ) And on the script for take the marihuana: [2015-02-14 15:28:46] WARNING: drogas\s.lua:380: Bad argument @ 'getObjectScale' [Expected object at argument 1, got nil] [2015-02-14 15:28:46] WARNING: drogas\s.lua:382: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] [2015-02-14 15:28:46] WARNING: drogas\s.lua:383: Bad argument @ 'getElementPosition' [Expected element at argument 1, got boolean] [2015-02-14 15:28:46] WARNING: drogas\s.lua:384: Bad argument @ 'getDistanceBetweenPoints3D' [Expected vector3 at argument 1, got boolean] [2015-02-14 15:28:46] ERROR: drogas\s.lua:384: attempt to compare boolean with number And this is the script for take the marihuana: function cosechar ( ) local planta = getObjectScale ( planta ) local pjid = exports.players:getCharacterID( source ) local x,y,z = getElementPosition ( player ) local cx,cy,cz = getElementPosition ( planta ) if getDistanceBetweenPoints3D (x,y,z,cx,cy,cz) < 3 then if getObjectScale ( planta, 1) then destroyElement ( planta ) outputChatBox("((Has cosechado 6 g de maria))", source, 255, 255, 0) setElementData ( source, "maria", maria ) exports.players:giveMaria(source, 6) exports.sql:query_free('UPDATE characters SET maria = 5 WHERE characterID = '..pjid) else outputChatBox("((La planta es demasiado joven))", source, 255, 0, 0) end else outputChatBox("((Tienes que acercarte a una planta para cosecharla))", source, 255, 0, 0) end end addCommandHandler ("cosechar", cosechar) Please i need help, and thanks for your help.
×
×
  • Create New...