-
Posts
498 -
Joined
-
Last visited
Everything posted by Mhmd.z
-
انت مسوي يوم المود يتوقف , لازم تسوي يوم الاعب يخرج تجيب الداتا , وانت مو مسوي حدث يعطي الاعب الداتا ,
-
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 )
-
زبط الكود , المشكله كانت لآني غيرت اي بي السيرفر مشان الهماشي وكذه
-
حاطه بقروب الادمن , وقبلها شوف اول كود بالموضوع ما كان ييجي شي بالدي بق ممكن انه مشكله من السيرفر او شي؟ او لآنه سيرفر مجاني؟
-
الملف مصنوع بس تظل تفتحه المشكله هي مو بسطر المشكله هي بده رابط انا جربته وريني وش حطيت انت بالضبط لحتى اشتغل معك, مع الرابط وكلشي
-
بالكودين بيجي خطأ بالسطر الي فيه fetchRemote + كيف تفتح ملف مو مصنوع
-
لسا, ذي الاكواد شوف 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
-
صرت حاطط مشاركتين بموضوعي وما منهم فائده الي ما يقدر يفيدني مافي داعي يزود مشاركات هنا
-
طيب كيف اجيب رابط مباشر لعرضه ؟ ومو كل المواقع تقبل رفع ملفات .map
-
اابي اجيب الكلام من الملف يلي بالرابط... 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)
-
انت تقول تبي تعطي نقاط للاعب, اعطيته نقاط عن طريق الداتا, لو تبي مثلا تشوف نقاطك ذا مثال: addCommandHandler("getScoreMission", function(player) outputChatBox("You score in mission is: "..getElementData(player, "PlayerScoreMission ", player) end )
-
تمام بس الكلمة تظهر عاوزها ما تظهر الكلام يظهر السبب هو انك مشغل مود الفري روم او مسوي مود تاجات
-
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 )
-
"onMarkerHit" -- بس الاعب يلمس الماركر givePlayerMoney -- تعطيه فلوس المهمه destroyElement -- تشيل الماركر setElementData--تعطي نقاط للاعب getElementData-- تجيب نقاط الاعب
-
وضح فكرتك , اكوادك مخربطه , مافي لكل حدث فنكشن ومافي اغلاق للحدث, والفكره مو واضحه وش تبي تسوي بالزبط
-
"onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText getPlayerFromName getPedOccupiedVehicle blowVehicle
-
مود حلو اهنيك, واصل يا بطل
-
+ getTimerDetails
-
--Loop addCommandHandler getElementsByType getPlayerName setElementFrozen setTimer outputChatBox
-
حبي , انت ناسي تحط حجم الماركر ؟ ! خليت حجمه 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 )
-
لازم تضع 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 )