DeLTon Posted October 3, 2015 Share Posted October 3, 2015 اولاً السلام عليكم ورحمه الله وبركاته اخباركم ان شاء الله طيبين المهمم واجهتني مشكله بتحويل مود الترقيه بالساعات الى لفلات نحط لكم الكود وانتوا تشوفون xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,255,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,255,0,255,true); end local sValue = getElementData( source,'Level' ) if not sValue then sValue = '0' end local data = sValue local hour = tonumber( data ) if hour == nil or not tonumber(hour) then hour = 0 end if ( hour >= tonumber(Price)) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,255,true); else outputChatBox("**ليس لديك لفلات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) الداتا م تقبل لفل , بس تقبل اكس بي ماادري وش المشكله بس مع أن الداتا حقت مود اللفل اسمها - Level Link to comment
GraveDigger. Posted October 3, 2015 Share Posted October 3, 2015 xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,255,0,255,true) end local lvl = getElementData( source,"Level") if ( lvl >= tonumber(Price) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account) outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,255,true) else outputChatBox("**ليس لديك لفلات كافية",source,255,0,0,true) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) Link to comment
DeLTon Posted October 3, 2015 Author Share Posted October 3, 2015 xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,255,0,255,true) end local lvl = getElementData( source,"Level") if ( lvl >= tonumber(Price) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account) outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,255,true) else outputChatBox("**ليس لديك لفلات كافية",source,255,0,0,true) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) مقدر خربان , زر الترقيه لما اضغط عليه م يقول شيء Link to comment
DeLTon Posted October 3, 2015 Author Share Posted October 3, 2015 اطرح جزء الكلينت . ---------------------- -- Setting ---------------------- local x, y = guiGetScreenSize() local rx, ry = (x/800), (y/600) local Admin = { {"[Rank]-","V.I.P","10"}, {"[Rank]-","PRO","35"}, {"[Rank]-","Level.1","85"}, {"[Rank]-","Level.2","150"}, {"[Rank]-","Killer","260"}, {"[Rank]-","xModerator","380"}, {"[Rank]-","ModeratorPlus","530"}, {"[Rank]-","xSuperModerator","785"}, {"[Rank]-","SuperModeratorPlus","995"}, {"[Rank]-","xAdmin","1450"}, {"[Rank]-","Head.Admin","1670"}, {"[Rank]-","Special.Admin","1960"}, {"[Rank]-","Vote-Manger","2460"}, {"[Rank]-","Manger.Server","6820"}, } ---------------------- -- Setting ---------------------- GUIEditor = { button = {} } GUIEditor.button[1] = guiCreateButton(295, 472, 178, 56, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GiveAdmin = guiCreateGridList(254, 157, 256, 302, false) guiGridListAddColumn(GiveAdmin, "Admins", 0.3) guiGridListAddColumn(GiveAdmin, "Group", 0.3) guiGridListAddColumn(GiveAdmin, "Level", 0.3) function buy() dxDrawLine(236 - 1, 101 - 1, 236 - 1, 538, tocolor(255, 0, 0, 0), 1, false) dxDrawLine(526, 101 - 1, 236 - 1, 101 - 1, tocolor(255, 0, 0, 0), 1, false) dxDrawLine(236 - 1, 538, 526, 538, tocolor(255, 0, 0, 0), 1, false) dxDrawLine(526, 538, 526, 101 - 1, tocolor(255, 0, 0, 0), 1, false) dxDrawRectangle(236, 101, 290, 437, tocolor(54, 151, 224, 224), false) dxDrawLine(235, 144, 526, 144, tocolor(54, 151, 224, 224), 1, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawRectangle(285, 466, 198, 67, tocolor(54, 54, 54, 212), false) dxDrawText("~ ترقيه ~", 300, 465, 469, 523, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) end removeEventHandler("onClientRender",root,buy) guiSetVisible ( GUIEditor.button[1], false ) guiSetVisible ( GiveAdmin, false ) ----------------------------------------------------------- function OpenWin() if removeEventHandler("onClientRender",root,buy)then removeEventHandler("onClientRender",root,buy) guiSetVisible ( GUIEditor.button[1], false ) guiSetVisible ( GiveAdmin, false ) showCursor(false) else addEventHandler("onClientRender",root,buy) guiSetVisible ( GUIEditor.button[1], true ) guiSetVisible ( GiveAdmin, true ) showCursor(true) end end bindKey ( "F1", "down", OpenWin ) for k,v in ipairs ( Admin ) do row = guiGridListAddRow(GiveAdmin); guiGridListSetItemText(GiveAdmin,row,1,v[1],false,false); guiGridListSetItemText(GiveAdmin,row,2,v[2],false,false); guiGridListSetItemText(GiveAdmin,row,3,v[3],false,false); guiGridListSetItemColor(GiveAdmin,row,1,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin,row,2,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin,row,3,math.random(0,255),math.random(0,255),math.random(0,255)) end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GiveAdmin ) local Group = tostring ( guiGridListGetItemText(GiveAdmin,row,2 )); local Price = tostring ( guiGridListGetItemText(GiveAdmin,row,3 )); local Name = tostring ( guiGridListGetItemText(GiveAdmin,row,1 )); if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent("Accept:the:request",localPlayer,Group,Price,Name); else outputChatBox("* الرجاء اختيار رتبةة !",255,0,0,true); end end addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false) Link to comment
LoOs Posted October 3, 2015 Share Posted October 3, 2015 اطرح جزء الكلينت . ---------------------- -- Setting ---------------------- local x, y = guiGetScreenSize() local rx, ry = (x/800), (y/600) local Admin = { {"[Rank]-","V.I.P","10"}, {"[Rank]-","PRO","35"}, {"[Rank]-","Level.1","85"}, {"[Rank]-","Level.2","150"}, {"[Rank]-","Killer","260"}, {"[Rank]-","xModerator","380"}, {"[Rank]-","ModeratorPlus","530"}, {"[Rank]-","xSuperModerator","785"}, {"[Rank]-","SuperModeratorPlus","995"}, {"[Rank]-","xAdmin","1450"}, {"[Rank]-","Head.Admin","1670"}, {"[Rank]-","Special.Admin","1960"}, {"[Rank]-","Vote-Manger","2460"}, {"[Rank]-","Manger.Server","6820"}, } ---------------------- -- Setting ---------------------- GUIEditor = { button = {} } GUIEditor.button[1] = guiCreateButton(295, 472, 178, 56, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GiveAdmin = guiCreateGridList(254, 157, 256, 302, false) guiGridListAddColumn(GiveAdmin, "Admins", 0.3) guiGridListAddColumn(GiveAdmin, "Group", 0.3) guiGridListAddColumn(GiveAdmin, "Level", 0.3) function buy() dxDrawLine(236 - 1, 101 - 1, 236 - 1, 538, tocolor(255, 0, 0, 0), 1, false) dxDrawLine(526, 101 - 1, 236 - 1, 101 - 1, tocolor(255, 0, 0, 0), 1, false) dxDrawLine(236 - 1, 538, 526, 538, tocolor(255, 0, 0, 0), 1, false) dxDrawLine(526, 538, 526, 101 - 1, tocolor(255, 0, 0, 0), 1, false) dxDrawRectangle(236, 101, 290, 437, tocolor(54, 151, 224, 224), false) dxDrawLine(235, 144, 526, 144, tocolor(54, 151, 224, 224), 1, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText("= [ Panel Rank ] =", 274, 107, 488, 134, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawRectangle(285, 466, 198, 67, tocolor(54, 54, 54, 212), false) dxDrawText("~ ترقيه ~", 300, 465, 469, 523, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) end removeEventHandler("onClientRender",root,buy) guiSetVisible ( GUIEditor.button[1], false ) guiSetVisible ( GiveAdmin, false ) ----------------------------------------------------------- function OpenWin() if removeEventHandler("onClientRender",root,buy)then removeEventHandler("onClientRender",root,buy) guiSetVisible ( GUIEditor.button[1], false ) guiSetVisible ( GiveAdmin, false ) showCursor(false) else addEventHandler("onClientRender",root,buy) guiSetVisible ( GUIEditor.button[1], true ) guiSetVisible ( GiveAdmin, true ) showCursor(true) end end bindKey ( "F1", "down", OpenWin ) for k,v in ipairs ( Admin ) do row = guiGridListAddRow(GiveAdmin); guiGridListSetItemText(GiveAdmin,row,1,v[1],false,false); guiGridListSetItemText(GiveAdmin,row,2,v[2],false,false); guiGridListSetItemText(GiveAdmin,row,3,v[3],false,false); guiGridListSetItemColor(GiveAdmin,row,1,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin,row,2,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin,row,3,math.random(0,255),math.random(0,255),math.random(0,255)) end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GiveAdmin ) local Group = tostring ( guiGridListGetItemText(GiveAdmin,row,2 )); local Price = tostring ( guiGridListGetItemText(GiveAdmin,row,3 )); local Name = tostring ( guiGridListGetItemText(GiveAdmin,row,1 )); if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent("Accept:the:request",localPlayer,Group,Price,Name); else outputChatBox("* الرجاء اختيار رتبةة !",255,0,0,true); end end addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false) يالخوي وش درانا عن اسم الداتا حق اللفل , لو تقدر اطرح اكواد مود اللفلات , Link to comment
TAPL Posted October 3, 2015 Share Posted October 3, 2015 بالغالب الألمنت داتا سترنق و فيه كلمة لفل "Level 1" شي زي كذا تحتاج تجيب الرقم لحاله عشان تقدر تستخدمه ب المقارنة جرب استبدل ذا السطر local data = sValue بذا: local data = tonumber(string.sub(sValue, 6)) Link to comment
DeLTon Posted October 4, 2015 Author Share Posted October 4, 2015 بالغالب الألمنت داتا سترنق و فيه كلمة لفل"Level 1" شي زي كذا تحتاج تجيب الرقم لحاله عشان تقدر تستخدمه ب المقارنة جرب استبدل ذا السطر local data = sValue بذا: local data = tonumber(string.sub(sValue, 6)) تابل والله لو انت جنبي لأسلم على راسك ي شيخخخ الله يوفقكك , لي اسبوع وانا ادور حل واجيب مبرمجين ولا يعرفون ربي يسعدك ي تابل اسمع تقدر توسط المود , تخليه بالنصص لأنه بشاشتي فوق باليسار Link to comment
LoOs Posted October 4, 2015 Share Posted October 4, 2015 بالغالب الألمنت داتا سترنق و فيه كلمة لفل"Level 1" شي زي كذا تحتاج تجيب الرقم لحاله عشان تقدر تستخدمه ب المقارنة جرب استبدل ذا السطر local data = sValue بذا: local data = tonumber(string.sub(sValue, 6)) تابل والله لو انت جنبي لأسلم على راسك ي شيخخخ الله يوفقكك , لي اسبوع وانا ادور حل واجيب مبرمجين ولا يعرفون ربي يسعدك ي تابل اسمع تقدر توسط المود , تخليه بالنصص لأنه بشاشتي فوق باليسار طيب معك مقاس الشاشة الي زينت فيها اللوحة ؟ Link to comment
TAPL Posted October 4, 2015 Share Posted October 4, 2015 جرب استخدم الفنكشن ذا https://wiki.multitheftauto.com/wiki/CenterWindow Link to comment
Rockyz Posted October 4, 2015 Share Posted October 4, 2015 اذا هذا دي اكس هذا شرح توسيطه http://www.gta-arabs.com/gt/-mta-/131490-dx.html Link to comment
Rm-Dj Posted October 4, 2015 Share Posted October 4, 2015 بالغالب الألمنت داتا سترنق و فيه كلمة لفل"Level 1" شي زي كذا تحتاج تجيب الرقم لحاله عشان تقدر تستخدمه ب المقارنة جرب استبدل ذا السطر local data = sValue بذا: local data = tonumber(string.sub(sValue, 6)) تابل وش يعني رقم ٦ الي حطيته ممكن تشرح فايدته Link to comment
TAPL Posted October 4, 2015 Share Posted October 4, 2015 "Level 1" L = 1 e = 2 v = 3 e = 4 l = 5 = 6 1 = 7 الكود ذا رح يتخطى اول 6 حروف و يبدأ من الحرف 7 local data = tonumber(string.sub(sValue, 6)) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now