Jump to content

mhmd

Members
  • Posts

    10
  • Joined

  • Last visited

Details

  • Gang
    nigga

mhmd's Achievements

Member

Member (5/54)

0

Reputation

  1. طيب شكرا بجرب ابدل الارقمنتات و بجرب السكربت و برد لك خبر
  2. المعلومات متأكد منها %100 و السكربت قبل كان شغال بس لما بدلت الاستضافة مدري وش صار
  3. المعلومات صحيحة من استضافة ديلوكس الهوست: ca1.delux-host.com اليوزرنيم: db20 الداتابيس: db20 65wb3anm6wv3ck75peei3 : الباسوورد و بالله قولي وين الخطأ
  4. يقول لي خطأ يتعذر التوصيل ف بالله حد يقدر يشوف لي حل؟ (mysql)شباب بالله حد يساعدني مدري ليه كل ما اوصل السيرفر بالداتا بيس ما يشتغل جربت 100 حل ولا حل نفع حتى لما اشغل السكربت المايسقل رسالة من الدي بق : ERROR: mysql/mysql.lua:5: dbconnet failed; could not connect .... و هذي من الكونسول اف8 : Connection with the MySQL database failed! .. وهذي الرسالة رح تحصلها بالسكربت نفسها اذا ما اشتغل:.... .اسف على التخبيص بالكلام لانه فيه كتابة انجليزية .المهم اترككم مع السكربت script: -- Connection functions local connection = nil local function connect( ) connection = dbConnect( "mysql", "dbname=db20;host=127.0.0.1;port=3306;unix_socket=/var/run/mysqld/mysqld.sock", "db20", "65wb3anm6wv3ck75peei3", "share=1" ) if connection then outputConsole ( "Server is now connected with the MySQL database!", 1 ) return true else outputConsole ( "Connection with the MySQL database failed!", 1 ) return false end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), connect ) -- Exported functions function query( ... ) if connection then local qh = dbQuery( connection, ... ) local result = dbPoll( qh, -1 ) return result else return false end end -- Get a single row from the database function querySingle( str, ... ) if connection then local result = query( str, ... ) if type(result) == 'table' then return result[1] end return result else return false end end -- DB exec as used function exec( str, ... ) if connection then local qh = dbExec( connection, str, ... ) return qh else return false end end meta: "mysql" version="1.0.0" type="script" name="mysql" description="MySQL config resource" /> (mysql database)و هذي شوية معلومات عن المايسقل داتا بيس: Host: ca1.delux-host.com Username: db20 Password: 65wb3anm6wv3ck75peei3 Database: db20 بالله حد يساعدني ؟
  5. guys please help me, i can't connect my MTA server with mysql database i don't even know why the server doesn't access the mysql db. i have used this script to make the server access the database, but the debug gives me this failure : ERROR: mysql/mysql.lua:5: dbconnet failed; could not connect .... and i get this message in console : Connection with the MySQL database failed! .. that message you can see it in the script:.... script: -- Connection functions local connection = nil local function connect( ) connection = dbConnect( "mysql", "dbname=db20;host=127.0.0.1;port=3306;unix_socket=/var/run/mysqld/mysqld.sock", "db20", "65wb3anm6wv3ck75peei3", "share=1" ) if connection then outputConsole ( "Server is now connected with the MySQL database!", 1 ) return true else outputConsole ( "Connection with the MySQL database failed!", 1 ) return false end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), connect ) -- Exported functions function query( ... ) if connection then local qh = dbQuery( connection, ... ) local result = dbPoll( qh, -1 ) return result else return false end end -- Get a single row from the database function querySingle( str, ... ) if connection then local result = query( str, ... ) if type(result) == 'table' then return result[1] end return result else return false end end -- DB exec as used function exec( str, ... ) if connection then local qh = dbExec( connection, str, ... ) return qh else return false end end meta: "mysql" version="1.0.0" type="script" name="mysql" description="MySQL config resource" /> and this is some information about my, mysql database: Host: ca1.delux-host.com Username: db20 Password: 65wb3anm6wv3ck75peei3 Database: db20 so please could anyone help me?
  6. وش فائدة اول كود = viewtopic.php?f=160&t=67837 جربت الكود الي انت حطاه بس يوم افتح المود في الريسورس ما يطلع المود ما اقدر اشوفه يعني ما يشتغل ن شاء الله تكون فهمتني
  7. اخواني جربت جميع الاواد و لم تنجح و حق تابل client: function checkTransfer() if isTransferBoxActive() == true then setTimer(checkTransfer, 2000, 1) else setElementData(localPlayer, "iLoveMyMother", true) end end addEventHandler("onClientResourceStart", resourceRoot, checkTransfer) server: local Vehicles = {} VehicleM = createMarker ( 1797.33508, 860.26874, 10.64586, "cylinder", 2, 255, 255, 0, 255 ) addEventHandler( "onMarkerHit", VehicleM, function ( hitElement ) if getElementType( hitElement ) == "player" and not isPedInVehicle( hitElement ) then if isElement(Vehicles[hitElement]) then destroyElement( Vehicles[hitElement] ) Vehicles[hitElement] = nil end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( 411, x, y, z ) warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "يرجى الاحتفاظ بالسيارة حتى ينتهي التحميل", hitElement, 255, 0, 0, true ) end end ) addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if isElement(Vehicles[source]) then destroyElement( Vehicles[source] ) end end ) meta: <meta> <info author="helovehismother" version="1.0.4" type="script"/> <script src="Server.lua" type="server"/> <script src="Client.lua" type="client" /> </meta> هل يوجد اخطاء ؟ او الخطأ مني؟ و اسف على الاطالة
  8. الكود حصلته بالمنتدى ذا و شكرا لصاحب الموضوع و شكرا على الردود جاري التجربة
  9. السلام عليكم ورحمة الله و بركاته ما ابي اطول عليكم فيه كود و ابيكم تتاكدو منه الكود ذا وظيفته انه اذا اي حد ما خلص عنده التحميل و دخل الماركر تجيه سيارة بس الكود مدري ليه ما يشتغل عندي بالله ابي مساعدتكم lua: VehicleM = createMarker ( 1470.91150, 1840.44360, 10.81250, "cylinder", 2, 255, 255, 0, 255 ) addEventHandler( "onMarkerHit", VehicleM, function ( hitElement ) if getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( 411, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "يرجى الاحتفاظ بالسيارة حتى ينتهي التحميل", hitElement, 255, 0, 0, true ) end end end ) addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) meta: <meta> <info author="script" type="play" name="play" description="you should go to marker and it will give you a car" /> <script src="script.lua" /> </meta> وشكرا
×
×
  • Create New...