-
Posts
210 -
Joined
-
Last visited
Everything posted by ميدوح
-
السلام عليكم ورحمة الله وبركاته ابي ذا او معك 3ds Max؟
-
شوف فوق ؟؟ مهم ابي حفظ -- im.lua function isCursorOverRectangle(x,y,w,h) if isCursorShowing() then local mx,my = getCursorPosition () local ScreenX,ScreenY = guiGetScreenSize() cursorx,cursory = mx*ScreenX,my*ScreenY if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end end local qual = 50 local dim = y/qual local rgb = {} local colors = { [1] = tocolor(255,0,0), [2] = tocolor(0,255,0), [3] = tocolor(0,0,255), } function render() for i = 0, qual*qual do local cA = math.floor(i/qual) local ws = i%qual local colorsA = colors[rgb[i+1]] dxDrawRectangle(ws*dim, cA*dim, dim, dim, colorsA ,false) if isCursorOverRectangle(ws*dim, cA*dim, dim, dim) then for color,_ in ipairs(colors) do if getKeyState(tostring(color)) then rgb[i+1] = color end end end end end addEventHandler("onClientRender", root, render) كيف حفظ
-
الثاني ترسم بس كيف حفظ ! fetchRemote ( "https://cdn1.iconfinder.com/data/icons/loading-icon/100/loading_icon-02-256.png", picClient, "", false, player )
-
--- كلنت rot = 0 function aRender ( ) if myTexture then rot = rot + 0.20 local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture,rot ) destroyElement( myTexture ) -- FaHaD ^_^ end end addEventHandler ( 'onClientRender',root,aRender ) setTimer ( removeEventHandler,10000,1,'onClientRender',root,aRender ) -- X ! --- function isCursorOverRectangle(x,y,w,h) if isCursorShowing() then local mx,my = getCursorPosition () local ScreenX,ScreenY = guiGetScreenSize() cursorx,cursory = mx*ScreenX,my*ScreenY if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end end local qual = 50 local dim = y/qual local rgb = {} local colors = { [1] = tocolor(255,0,0), [2] = tocolor(0,255,0), [3] = tocolor(0,0,255), } function render() for i = 0, qual*qual do local cA = math.floor(i/qual) local ws = i%qual local colorsA = colors[rgb[i+1]] dxDrawRectangle(ws*dim, cA*dim, dim, dim, colorsA ,false) if isCursorOverRectangle(ws*dim, cA*dim, dim, dim) then for color,_ in ipairs(colors) do if getKeyState(tostring(color)) then rgb[i+1] = color end end end end end addEventHandler("onClientRender", root, render) ابي حفظ صور كيف ^
-
الكود تمام ..بس طيب كيف اشيل الصورة نهائيا؟ setTimer ( removeEventHandler,10000,1,'onClientRender',root,aRender ) زي ^ مره
-
up setTimer ( removeEventHandler("onClientRender",root,function() getEventHandlers ("onClientRender",root) cancelEvent () end), 1000, 1) ! nil ^
-
صح صلحت الخطا شكرا لك بالنسبة triggerLatentClientEvent بيصغر مساحة صور
-
--- Client.lua addEvent( "Downloadwait", true ) addEventHandler( "Downloadwait", resourceRoot, function( pic ) if myTexture then destroyElement( myTexture ) end myTexture = dxCreateTexture( pic ) end ) rot = 0 addEventHandler("onClientRender", root, function() if myTexture then rot = rot + 0.20 local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture,tocolor(255,255,255),rot ) end end ) --------- ---- server.lua function picClient ( pic, error, player ) if error == 0 then triggerLatentClientEvent ("Downloadwait", 5000, false, player, pic ) end end function urlPic( player ) outputChatBox ( "Download startet ...") fetchRemote ( "https://cdn1.iconfinder.com/data/icons/loading-icon/100/loading_icon-02-256.png", picClient, "", false, player ) end [2016-10-23 14:33:07] WARNING: Access denied @ 'fetchRemote' [string "..."] [2016-10-23 14:33:13] WARNING: cpng\server.lua:10: Access denied @ 'fetchRemote'
-
مبروووك --- ممكن سؤال؟ Authorized serial account protection is DISABLED. See https://mtasa.com/authseria
-
سؤال ؟ --- كلنت gLevel = { {10,1}, -- {Score,Level} {20,2}, {30,3}, {40,4}, {50,5}, {60,6}, } addEvent ("windowLevel", true) addEventHandler ("windowLevel", root, function() getElementData(source,'Score') getElementData(source,'level') end) addEventHandler("onClientGUIClick", root, function (button,stat) if (source == AdminAnswerButton ) then -- Admin question! if (string.lower(Adminanswer) == string.lower(answer)) then setElementData(source,'Score',0 > gLevel[1]) setElementData(source,'level',0 > gLevel[2]) end end end) --- server function saveDataLevel() local Missile_Acc = getPlayerAccount(source) local MissileData = getElementData(source,'level') if ( MissileData ) then if ( Missile_Acc ) and not isGuestAccount ( Missile_Acc ) then setAccountData(Missile_Acc,'MissileData',MissileDa ta) triggerClientEvent ( Missile_Acc, "windowLevel", MissileData) end end end addEventHandler('onPlayerLogin',root,saveDataLevel )
-
-- كلنت addEventHandler("onClientResourceStart", resourceRoot, function() -- admin Question quizWindow = guiCreateWindow(232, 277, 382, 210, "Quiz Admin", false) guiSetVisible(quizWindow, false) Questionlabel = guiCreateLabel(10, 24, 79, 27, "Question:", false, quizWindow) Questionedit = guiCreateEdit(79, 22, 215, 25, "", false, quizWindow) AdminAnswerlabel = guiCreateLabel(20, 84, 79, 27, "Answer:", false, quizWindow) AdminAnsweredit = guiCreateEdit(79, 84, 215, 25, "", false, quizWindow) AdminAnswerButton = guiCreateButton(105, 144, 131, 34, "set", false, quizWindow) AdminGetAnswerButton = guiCreateButton(284, 125, 83, 35, "Get Answer", false, quizWindow) AdminLevelButton = guiCreateButton(284, 165, 83, 35, "Level", false,quizWindow) ---Admin GetAnswerButton GetAnswerWindow = guiCreateWindow(537, 245, 215, 294, "Get Answer", false) guiSetVisible(GetAnswerWindow, false) GetAnswerGridlist = guiCreateGridList(9, 27, 196, 235, false, GetAnswerWindow) guiGridListAddColumn(GetAnswerGridlist, "Name", 0.3) guiGridListAddColumn(GetAnswerGridlist, "Answer", 0.3) for i = 1,30 do name = getPlayerName(source) local Adminanswer = guiGetText(AdminAnsweredit) -- admin answer local answer = guiGetText(answerEdit) -- guys answer if (string.lower(Adminanswer) == string.lower(answer)) then guiGridListAddRow(GetAnswerGridlist) guiGridListSetItemText(GetAnswerGridlist, 0, 1, i.."- "..name, false, false) guiGridListSetItemText(GetAnswerGridlist, 0, 2, answer, false, false) end end GetAnswerButtonX= guiCreateButton(58, 263, 92, 21, "X", false, GetAnswerWindow) --- Admin Level AdminLevelWindow = guiCreateWindow(537, 245, 215, 294, "Level", false) guiSetVisible(AdminLevelWindow, false) AdminLevelGridlist = guiCreateGridList(9, 27, 196, 235, false, AdminLevelWindow) guiGridListAddColumn(AdminLevelGridlist, "Name", 0.3) guiGridListAddColumn(AdminLevelGridlist, "Score", 0.3) guiGridListAddColumn(AdminLevelGridlist, "Level", 0.3) for i = 1,30 do name = getPlayerName(source) ScoreGuy = getElementData(source, "ScoreGuy") LevelGuy = getElementData(source, "LevelGuy") guiGridListAddRow(AdminLevelGridlist) guiGridListSetItemText(AdminLevelGridlist, 0, 1, i.."- "..name, false, false) guiGridListSetItemText(AdminLevelGridlist, 0, 2, ScoreGuy, false, false) --Score guiGridListSetItemText(AdminLevelGridlist, 0, 3, LevelGuy, false, false) --level end AdminLevelButtonX = guiCreateButton(58, 263, 92, 21, "X", false, AdminLevelWindow) --------------- -- guy answers answerWindow = guiCreateWindow(132, 296, 419, 193, "set Answer", false) guiSetVisible(answerWindow, false) Scorelabel = guiCreateLabel(12, 27, 76, 27, "Score:", false, answerWindow) Levellabel = guiCreateLabel(12, 54, 76, 27, "your Level :", false, answerWindow) answerEdit = guiCreateEdit(88, 96, 278, 36, "", false,answerWindow) TextAnswerlabel = guiCreateLabel(12, 100, 76, 27, "Text Answer:", false,answerWindow) answerButton = guiCreateButton(139, 153, 131, 30, "set", false, answerWindow) LevelAnswerButton = guiCreateButton(12, 153, 131, 30, "Level", false, answerWindow) -- LevelAnswerButton LevelWindow = guiCreateWindow(537, 245, 215, 294, "Level", false) guiSetVisible(LevelWindow, false) LevelGridlist = guiCreateGridList(9, 27, 196, 235, false, LevelWindow) guiGridListAddColumn(LevelGridlist, "Name", 0.3) guiGridListAddColumn(LevelGridlist, "Score", 0.3) guiGridListAddColumn(LevelGridlist, "Level", 0.3) for i = 1,30 do name = getPlayerName(source) ScoreGuy = getElementData(source, "ScoreGuy") LevelGuy = getElementData(source, "LevelGuy") guiGridListAddRow(LevelGridlist) guiGridListSetItemText(LevelGridlist, 0, 1, i.."- "..name, false, false) guiGridListSetItemText(LevelGridlist, 0, 2, ScoreGuy, false, false) --Score guiGridListSetItemText(LevelGridlist, 0, 3, LevelGuy, false, false) --level end LevelButtonX = guiCreateButton(58, 263, 92, 21, "X", false, LevelWindow) end ) AdminLevel = { {10,1}, {20,2}, {30,3}, {40,4}, {50,5}, --....-- {Score,Level} } addEventHandler("onClientGUIClick", root, function (button,stat) if (source == AdminAnswerButton ) then -- Admin question! local Adminanswer = guiGetText(AdminAnsweredit) local AdminQuestion = guiGetText(Questionedit) setTimer(function() guiCreateLabel(30, 24, 179, 127, AdminQuestion, false) guiSetVisible(quizWindow, false) showCursor(guiGetVisible(quizWindow)) end,3000,1) elseif (source == AdminGetAnswerButton) then -- Admin Get Answer guiSetVisible(GetAnswerWindow, true) for i = 1,30 triggerServerEvent("GetAnswer", localPlayer, name,answer) guiGridListAddRow(AdminLevelGridlist) guiGridListSetItemText(AdminLevelGridlist, 0, 1, i.."- "..name, false, false) guiGridListSetItemText(AdminLevelGridlist, 0, 2, answer, false, false) end elseif (source == AdminLevelButton) then -- Admin Level guiSetVisible(AdminLevelWindow, true) for i = 1,30 do triggerServerEvent("LevelAnswer", localPlayer,name,ScoreGuy,LevelGuy) guiGridListAddRow(AdminLevelGridlist) guiGridListSetItemText(AdminLevelGridlist, 0, 1, i.."- "..name, false, false) guiGridListSetItemText(AdminLevelGridlist, 0, 2, ScoreGuy, false, false) --Score guiGridListSetItemText(AdminLevelGridlist, 0, 3, LevelGuy, false, false) --level end elseif (source == answerButton) then -- Guys answ local Adminanswer = guiGetText(AdminAnsweredit) -- admin answer local answer = guiGetText(answerEdit) -- guys answer if (string.lower(Adminanswer) == string.lower(answer)) then setElementData(source, "ScoreAnsw", 0 >~ AdminLevel[1][1]) + 1 setElementData(source, "LevelAnsw", 0 > AdminLevel[2][1]) + 1 --setElementData(source, "Clever", (getElementData(source, "Clever") or 0) + 1) end elseif (source == LevelAnswerButton) then -- guys Level guiSetVisible(LevelWindow, true) for i = 1,30 do triggerServerEvent("LevelAnswer", localPlayer,name,ScoreGuy,LevelGuy) guiGridListAddRow(LevelGridlist) guiGridListSetItemText(LevelGridlist, 0, 1, i.."- "..name, false, false) guiGridListSetItemText(LevelGridlist, 0, 2, ScoreGuy, false, false) --Score guiGridListSetItemText(LevelGridlist, 0, 3, LevelGuy, false, false) --level end elseif (source == GetAnswerButtonX) then -- close GetAnswer = admin guiSetVisible(GetAnswerWindow, false) showCursor(guiGetVisible(GetAnswerWindow)) elseif (source == AdminLevelButtonX) then -- close Level = admin guiSetVisible(AdminLevelWindow, false) showCursor(guiGetVisible(AdminLevelWindow)) elseif (source == LevelButtonX) then -- close Level = guys guiSetVisible(LevelWindow, false) showCursor(guiGetVisible(LevelWindow)) end end) bindKey("F2","down",function() -- admin f2 guiSetVisible(quizWindow,not guiGetVisible(quizWindow)) showCursor(guiGetVisible(quizWindow)) end ) bindKey("F3","down",function() -- answer f3 guiSetVisible(answerWindow,not guiGetVisible(answerWindow)) showCursor(guiGetVisible(answerWindow)) end ) --سيرفر addEvent("GetAnswer", true) addEventHandler("GetAnswer", root, function(name,answer) name = getPlayerName(name) answer = "" end ) addEvent("LevelAnswer", true) addEventHandler("LevelAnswer", root, function(name,ScoreGuy,LevelGuy) name = getPlayerName(name) ScoreGuy = getElementData(source, "ScoreAnsw") LevelGuy = getElementData(source, "LevelAnsw") end )
-
السلام عليكم ورحمة الله وبركاته كيفكم؟ الصورة الاولية Sاحرف الـ في الخريطة تعبر عن المدرسة الصورة الثانية دفع التسجيل في المدرسة الصورة الثالثة شرح الاستاذ على السبورة وطرح الاسئلة الصورة الرابعة الطلاب والاجابة على اسئلة الاستاذ في مسابقة مستوى في مشكلة عندي في عمل المستوى وحفظها من يستطيع مساعدتي ؟ وشكرا لكم
-
من ملف واحد ابغى انقل منه البيانات للملف 2 وبنقله للملف 2 بالفعل بس اي زر ضغط مابيشتغل معايا او يكون معلق فاايش المشكلة وايه الحل من ملف واحد ابغى انقل منه البيانات للملف 2 وبنقله للملف 2 بالفعل بس اي زر ضغط مابيشتغل معايا او يكون معلق فاايش المشكلة وايه الحل
-
السلام عليكم ورحمة الله وبركاته كيفكم؟ في هادا الكود ملفguiGridlist.zip كله فيه بيشتغل تمام لكن في ملف scriptGui.zip مابيشتغل فيه الضغط onClick ----- ملف guiGridlist.zip --- كلنت = client.lua function guiGridlist(w, text, onClick,...) w = guiCreateWindow(...) text = guiCreateLabel(...) gridlistSet = guiCreateGridList(...) guiGridListSetItemText (gridlistSet,...) ---- local args = {...} for i,v in ipairs(args) do if v == "__self" then args[i] = gridlistSet end end addEventHandler("onClientGUIClick", gridlistSet, function (button, state) if button == "left" and state == "up" then if onClick then onClick(unpack(args or {})) end end end,false) ---- meta.xml <meta> <info author="medo7" version="1" type="misc" /> <script src="client.lua" type="Client" /> <export function="guiGridlist" type="client" /> </meta> --------------------------------------------------------- ---- ملف scriptGui.zip window[2] = guiCreateWindow(...) Label[5] = guiCreateLabel(...) guiSetVisible(Label[5],false) function clickText() guiSetVisible(Label[5],true) end exports.guiGridlist:guiGridlist(window[2], "name", clickText)
-
السلام عليكم ورحمة الله وبركاته كيفكم؟ الكود الاولاني تبع شراء تمام الكود الثاني : ليش ماتظهر اللوحة؟ --- server --- Marker2 = createMarker (-720.82202, 963.37451, 12.13281, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler( "onMarkerHit",Marker2 function ( hitElement) local playerTeam = getPlayerTeam ( source ) local theTeam = getTeamFromName ( playerTeam ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) if getElementType ( hitElement ) == players then triggerClientEvent(hitElement,"marker2",hitElement) end end end ) --- كلنت --- wind2 = guiCreateWindow(164, 407, 400, 150, "gui", false) guiSetVisible(wind2,false) -- gui team addEvent( "marker2", true ) addEventHandler ( "marker2", getRootElement(),function () guiSetVisible(wind2,true) showCursor(true) end)
-
ty ~~server~~ function getAdminAccountName(player) if not isGuestAccount( getPlayerAccount( player ) ) then local accountName = getAccountName( getPlayerAccount( player ) ) end return accountName end function getinfo() local result = mysql_query(handler, "SELECT * FROM account WHERE mtaserial='"..getPlayerSerial(source).."'") numRows = mysql_num_rows ( result ) if numRows == 1 then if (result) then while true do local data = mysql_fetch_assoc(result) if (not data) then break end name= tostring(data[getAdminAccountName(player)]) triggerClientEvent(source, "selectt", getRootElement(), name) end mysql_free_result(result) else end end end
-
-- server -- -- كود function getAdminAccountName(player) if not isGuestAccount( getPlayerAccount( player ) ) then local accountName = getAccountName( getPlayerAccount( player ) ) end return accountName end مثل outputChatBox (getAdminAccountName(player)) -- اسم حساب
-
local root = getRootElement() function chatbox(text, msgtype) local systemDBconnect = dbConnect( 'sqlite', ':TagsSystem-Professional_v01/[TAGS system] Database.db' ) local checkTag = dbQuery( systemDBconnect, ' SELECT * FROM `TagsSystemPro` WHERE serial = ? ', getPlayerSerial( source ) ) local dbValues = dbPoll( checkTag, -1 ) if ( type( dbValues ) == 'table' and #dbValues ~= 0 ) then local state = dbValues[1]['state'] if ( state == 'Enabled' ) then return end end local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local minText= 0 if isObjectInACLGroup("user." .. account, aclGetGroup("NO") and minText == 0 ) then cancelEvent() outputChatBox("NO" .. text, root, 255, 255, 255, true) minText = 1 elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then cancelEvent() outputChatBox("Console╝" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent() outputChatBox("#D90B7C♦[ « #27F2F2Pro Race #D90B7C» ]♦" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) end addEventHandler("onPlayerJoin", getRootElement(), ABOELGHAR) end addEventHandler("onPlayerChat", root, chatbox) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end
-
السلام عليكم ورحمة الله وبركاته كيفكم؟ ابي اسوي من داخل gui dx كود GUIEditor = { window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(234, 258, 270, 200, "WIN", false) guiWindowSetSizable(GUIEditor.window[1], false) end ) addEventHandler("onClientRender", root, function() dxDrawText("NAME :", 280, 300, 448, 427, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end )
-
i did a new professional resource how ? <include resource=" editacl" />