Do_De<3 Posted January 25, 2014 Share Posted January 25, 2014 (edited) السسلام عليكمم ورحمةة الله وبركاتهه : ) اخبآركممم شبآب !. وش مشكلةة الكود ذآ بالزبط : ) كلينت local Key = "F5" local Admin = { {"مساعد","msad.Admin","300"}, {"نآئب ","Big-admin","250"}, {"آدآرةة عامة","SAdmin","180"}, {"آدآرةة عآدي","Admin","90"}, {"مرآقــب","SuperModerator","60"}, {"مشرف","Moderator","25"}, {"شــرطي","Police","10"}, {"كبآر الششخصيآت","V.I.P","7"}, {"صصآحب الورشة","sa7b-wrsh","1"}, {"كنق الدآيري","king.aldayra","1"}, {"حـــــرآمـي","7rame","1"}, {"عآمل الورشة","3aml","1"}, {"درباوي","Drb","1"}, {"كنق الرفع","Alraf3","1"}, {"كنق المعززين","M3zz","1"}, } ---------------------- -- Setting ---------------------- GiveAdmin = { Window = {}, gridlist = {}, button = {}, label = {}, } function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false); local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false); end GiveAdmin.Window[1] = guiCreateWindow(445, 132, 310, 339, "==[ساعات الرتب]==", false); centerWindow(GiveAdmin.Window[1]); guiSetVisible(GiveAdmin.Window[1],false); guiWindowSetSizable(GiveAdmin.Window[1], false); guiSetAlpha(GiveAdmin.Window[1], 1.00); guiSetProperty(GiveAdmin.Window[1], "CaptionColour", "FF0383FB"); GiveAdmin.label[1] = guiCreateLabel(8, 19, 411, 33, "مرحبا بك في نظام الرتب :", false, GiveAdmin.Window[1]); guiSetFont(GiveAdmin.label[1], "default-bold-small") guiLabelSetColor(GiveAdmin.label[1], 255, 0, 0) GiveAdmin.gridlist[1] = guiCreateGridList(9, 51, 294, 236, false, GiveAdmin.Window[1]); guiGridListAddColumn(GiveAdmin.gridlist[1], "#", 0.2) guiGridListAddColumn(GiveAdmin.gridlist[1], "الرتبة #", 0.2); guiGridListAddColumn(GiveAdmin.gridlist[1], "القروب #", 0.2); guiGridListAddColumn(GiveAdmin.gridlist[1], "الساعات #", 0.2); GiveAdmin.label[2] = guiCreateLabel(10, 303, 167, 26, "Created By : Mr.Pres[T]ege", false, GiveAdmin.Window[1]); guiSetFont(GiveAdmin.label[2], "default-bold-small"); guiLabelSetColor(GiveAdmin.label[2], 41, 255, 0); GiveAdmin.button[1] = guiCreateButton(186, 302, 115, 26, "اختيار الرتبة #", false, GiveAdmin.Window[1]); guiSetFont(GiveAdmin.button[1], "default-bold-small"); guiSetProperty(GiveAdmin.button[1], "NormalTextColour", "FFF5FF00"); for k,v in ipairs ( Admin ) do row = guiGridListAddRow(GiveAdmin.gridlist[1]); guiGridListSetItemText(GiveAdmin.gridlist[1],row,1,''..k..'-',false,false); guiGridListSetItemText(GiveAdmin.gridlist[1],row,2,v[1],false,false); guiGridListSetItemText(GiveAdmin.gridlist[1],row,3,v[2],false,false); guiGridListSetItemText(GiveAdmin.gridlist[1],row,4,v[3],false,false); guiGridListSetItemColor(GiveAdmin.gridlist[1],row,1,255,255,0); guiGridListSetItemColor(GiveAdmin.gridlist[1],row,2,0,255,0) guiGridListSetItemColor(GiveAdmin.gridlist[1],row,3,255,255,0); guiGridListSetItemColor(GiveAdmin.gridlist[1],row,4,0,255,0); guiSetFont(GiveAdmin.gridlist[1],"default-bold-small"); end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GiveAdmin.gridlist[1] ) local Group = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,3 )); local Price = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,4 )); local Name = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,2 )); 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",GiveAdmin.button[1],xMainFunctions_,false); xBindFunction_ = function () guiSetVisible(GiveAdmin.Window[1],not guiGetVisible(GiveAdmin.Window[1])); showCursor(guiGetVisible(GiveAdmin.Window[1])); end bindKey(Key,"down",xBindFunction_); كلينت xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end local sValue = getElementData( source,'Time' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,string.byte(':')) local hour = tonumber( data and data[1] or 0 ) if hour == nil then hour = 0 end if ( hour >= tonumber(Price)) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); else outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) يعطي ادمنيةة وساعاتتهم 0 :\ Edited January 25, 2014 by Guest Link to comment
./BlackBird# Posted January 25, 2014 Share Posted January 25, 2014 local data = split(sValue,":") local hour = tonumber( data[1] ) Link to comment
Do_De<3 Posted January 25, 2014 Author Share Posted January 25, 2014 local data = split(sValue,":") local hour = tonumber( data[1] ) مآزبط : ) Link to comment
Do_De<3 Posted January 25, 2014 Author Share Posted January 25, 2014 لا لا زبط ضض2 ><" ثآنكسسس <3 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