Jump to content

Mhmd.z

Members
  • Posts

    498
  • Joined

  • Last visited

Everything posted by Mhmd.z

  1. انت مسوي يوم المود يتوقف , لازم تسوي يوم الاعب يخرج تجيب الداتا , وانت مو مسوي حدث يعطي الاعب الداتا ,
  2. addEventHandler('onResourceStart',resourceRoot, function () dataBase = dbConnect( "sqlite", "dataBase.db" ) dbExec ( dataBase, "CREATE TABLE IF NOT EXISTS playersData (account TEXT, mapData TEXT)" ) end ) addEventHandler('onPlayerQuit', root, function( ) local mapData = getElementData(source, "Partial-Map-1") local account = getAccountName(getPlayerAccount(source)) local qh = dbQuery( dataBase, "SELECT * FROM playersData WHERE account=?", account) local result = dbPoll( qh, -1 ) if result and type(result) == "table" and #result >= 1 then return dbExec( dataBase, "UPDATE playersData SET mapData=? WHERE account=?", mapData, account) end dbExec( dataBase, "INSERT INTO playersData (account, mapData) VALUES(?,?)", account, mapData) end ) addEventHandler('onPlayerLogin', root, function( ) local account = getAccountName( getPlayerAccount(source) ) local qh = dbQuery( dataBase, "SELECT * FROM playersData WHERE account=?", account) local result = dbPoll( qh, -1 ) if result then for _, row in ipairs ( result ) do setElementData(source, "Partial-Map-1",row["mapData"], true) end end end )
  3. زبط الكود , المشكله كانت لآني غيرت اي بي السيرفر مشان الهماشي وكذه
  4. حاطه بقروب الادمن , وقبلها شوف اول كود بالموضوع ما كان ييجي شي بالدي بق ممكن انه مشكله من السيرفر او شي؟ او لآنه سيرفر مجاني؟
  5. الملف مصنوع بس تظل تفتحه المشكله هي مو بسطر المشكله هي بده رابط انا جربته وريني وش حطيت انت بالضبط لحتى اشتغل معك, مع الرابط وكلشي
  6. بالكودين بيجي خطأ بالسطر الي فيه fetchRemote + كيف تفتح ملف مو مصنوع
  7. لسا, ذي الاكواد شوف fetchRemote("https://docs.google.com/forms/d/e/1FAIpQLSdTxcTTUdqWt0ttruiGSTL0Sf1xBYNAiLpQb-JyYJfkokUl2A/viewform", uploadFunction, "", false, source) function uploadFunction(data, errorNumber, thePlayer) outputChatBox("uploadFunction") if errorNumber == 0 then outputChatBox(data) outputChatBox("file uploaded") else outputChatBox("Eror: #"..errorNumber) end end
  8. بس الكود لساته مو شغال
  9. صرت حاطط مشاركتين بموضوعي وما منهم فائده الي ما يقدر يفيدني مافي داعي يزود مشاركات هنا
  10. طيب كيف اجيب رابط مباشر لعرضه ؟ ومو كل المواقع تقبل رفع ملفات .map
  11. اابي اجيب الكلام من الملف يلي بالرابط... function uploadFunction(data, errorNumber) outputChatBox("uploadFunction") if errorNumber == 0 then mapFile = fileCreate("newMap.map") fileWrite(mapFile, data) fileClose(mapFile) outputChatBox("file uploaded") else outputChatBox("Eror: #"..errorNumber) end end fetchRemote("http://download1472.mediafire.com/4igxxiaedw2g/3kfljg77k2ga087/basesMap.map", uploadFunction, "", false)
  12. انت تقول تبي تعطي نقاط للاعب, اعطيته نقاط عن طريق الداتا, لو تبي مثلا تشوف نقاطك ذا مثال: addCommandHandler("getScoreMission", function(player) outputChatBox("You score in mission is: "..getElementData(player, "PlayerScoreMission ", player) end )
  13. تمام بس الكلمة تظهر عاوزها ما تظهر الكلام يظهر السبب هو انك مشغل مود الفري روم او مسوي مود تاجات
  14. local theMarker = createMarker(0, 0, 0, "cylinder", 5, 255, 255, 255, 200) addEventHandler("onMarkerHit", theMarker, function(player) local randomMoney = math.random(50000, 70000) givePlayerMoney(player, randomMoney) setElementData(player, "PlayerScoreMission", (getElementData(player, "PlayerScoreMission") or 0) + 1) end )
  15. "onMarkerHit" -- بس الاعب يلمس الماركر givePlayerMoney -- تعطيه فلوس المهمه destroyElement -- تشيل الماركر setElementData--تعطي نقاط للاعب getElementData-- تجيب نقاط الاعب
  16. وضح فكرتك , اكوادك مخربطه , مافي لكل حدث فنكشن ومافي اغلاق للحدث, والفكره مو واضحه وش تبي تسوي بالزبط
  17. "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText getPlayerFromName getPedOccupiedVehicle blowVehicle
  18. مود حلو اهنيك, واصل يا بطل
  19. --Loop addCommandHandler getElementsByType getPlayerName setElementFrozen setTimer outputChatBox
  20. حبي , انت ناسي تحط حجم الماركر ؟ ! خليت حجمه 2 وحطيته الفا 144 local marker = createMarker ( 2042.68652, 1535.95911, 10.67188,"cylinder", 2, 255,255,255, 144) local hitMarker = false local blocked_buttons = { ["F1"] = true, ["F3"] = true, ["b"] = true, } addEventHandler ( "onClientMarkerHit", marker, function ( hitPlayer ) if ( hitPlayer == localPlayer and not hitMarker ) then hitMarker = true end end ) addEventHandler ( "onClientKey", root, function ( button ) if ( button == blocked_buttons [ button ] and hitMarker == true and getElementDimension ( localPlayer ) == 30 ) then outputChatBox ( "غير مصرح لك بفتح اللوحة الان ", 255, 0, 0, true ) cancelEvent() end end )
  21. لازم تضع localPlayer local marker = createMarker ( 2048.64526, 1539.34863, 1539.34863,"cylinder", 255,255,255 ) local hitMarker = false local blocked_buttons = { ["F1"] = true, ["F3"] = true, ["b"] = true, } addEventHandler ( "onClientMarkerHit", marker, function ( hitPlayer ) if ( hitPlayer == localPlayer and not hitMarker ) then hitMarker = true end end ) addEventHandler ( "onClientKey", root, function ( button ) if ( button == blocked_buttons [ button ] and hitMarker == true and getElementDimension ( localPlayer ) == 30 ) then outputChatBox ( "غير مصرح لك بفتح اللوحة الان ", 255, 0, 0, true ) cancelEvent() end end )
×
×
  • Create New...