mR.Z Posted October 6, 2014 Share Posted October 6, 2014 بسم الله الرحمن الرحيم معي مود الرتب حق الاخ برتسيج بس ابي اعدل عليه مثلا اذا احد معه Admin-ex او مخالف مايقدر يترقى + الي اخذ ترقيه مايقدر يترقى الى بعد 5 ساعات مثلا وشكرا Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 اطرح الكود يوم يضغط على الزر ويرقيه Link to comment
mR.Z Posted October 6, 2014 Author Share Posted October 6, 2014 قصدك سيرفر ؟ تفضل xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,math.random(0,255),math.random(0,255),math.random(0,255)) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,math.random(0,255),math.random(0,255),math.random(0,255)) end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) 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,math.random(0,255),math.random(0,255),math.random(0,255)) else outputChatBox("**ليس لديك ساعات كافية",source,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) او على حسب الي فهمته منك ! 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("* الرجاء اختيار رتبةة !",math.random(0,255),math.random(0,255),math.random(0,255)) 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_); شكرا على الرد السريع جنرال Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 استبدل هذا الفنكشن بَـ اللي عندك من اول او الي طرحته لي استبدله باللي تحت .. 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('newEvent', localPlayer) addEvent('onClick',true) addEventHandler('onClick', root, function ( ) triggerServerEvent("Accept:the:request",localPlayer,Group,Price,Name) end ) ; else outputChatBox("* الرجاء اختيار رتبةة !",math.random(0,255),math.random(0,255),math.random(0,255)) 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_); ضيف هذا لملف السيرفر بدون ماتعدل ملف السيرفر يعني اضافة بس addEvent("newEvent",true) function checkGroup( ) account = getAccountName(getPlayerAccount(source)) if not ( isObjectInACLGroup("user."..account, aclGetGroup("Admin-ex") ) ) then triggerClientEvent('onClick', source) end end addEventHandler("newEvent", root, checkGroup) Link to comment
mR.Z Posted October 6, 2014 Author Share Posted October 6, 2014 شكرا لك جنرال بس فيه خطاء اذا ضغطت ترقيه يطلع لي الكلام مكرر فوق 10 مرات ذذ + ابي يطلع له انه مخالف ولا يمكنه الترقيه addEvent("newEvent",true) function checkGroup( ) ACCOUNT = getAccountName(getPlayerAccount(source)) if not ( isObjectInACLGroup("user."..ACCOUNT, aclGetGroup("ex") ) ) then triggerClientEvent('onClick', source) outputChatBox("** انت مخالف لايمكنك ان تترقى "..Name,source,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("newEvent", root, checkGroup) ماضبط ذذ Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 شكرا لك جنرالبس فيه خطاء اذا ضغطت ترقيه يطلع لي الكلام مكرر فوق 10 مرات ذذ + ابي يطلع له انه مخالف ولا يمكنه الترقيه addEvent("newEvent",true) function checkGroup( ) ACCOUNT = getAccountName(getPlayerAccount(source)) if not ( isObjectInACLGroup("user."..ACCOUNT, aclGetGroup("ex") ) ) then triggerClientEvent('onClick', source) outputChatBox("** انت مخالف لايمكنك ان تترقى "..Name,source,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("newEvent", root, checkGroup) ماضبط ذذ اممم عندك ..Name ماهي معرفه Name = ??? لازم تعرفه او تستبدلها بـ ..getPlayerName(source) EDIT# : جرب كذا addEvent("newEvent",true) function checkGroup( ) ACCOUNT = getAccountName(getPlayerAccount(source)) Name = getPlayerName(source) if not ( isObjectInACLGroup("user."..ACCOUNT, aclGetGroup("ex") ) ) then triggerClientEvent('onClick', source) else outputChatBox("** انت مخالف لايمكنك ان تترقى "..Name,source,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("newEvent", root, checkGroup) Link to comment
mR.Z Posted October 6, 2014 Author Share Posted October 6, 2014 حلو اخوي نفذت الي الطلب الاول مشكور والله مشكور بس باقي طلب الي هوا ااذا اخذ رتبه مايقدر يترقى لمده 20 ساعه وبعدين يقدر Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 (edited) حلو اخوي نفذت الي الطلب الاول مشكور والله مشكور بس باقي طلب الي هوا ااذا اخذ رتبه مايقدر يترقى لمده 20 ساعه وبعدين يقدر حياك الله حبيبي setTimer( function( ) removeEventHandler('newEvent', root, checkGroup) triggerClientEvent('onClick', source) end, 60000*60*20, 1, true ) ضيفها لملف السيرفر زي ماضفت الطلب الاول يعني اضافه وليس تعديل =) Edited October 6, 2014 by Guest Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 ^علط وش علط هو حرف ناقص وصلحته Link to comment
shwaeki Posted October 6, 2014 Share Posted October 6, 2014 اول شي يقدر يطلع و يدخل و يروح الوقت و انتهيني ثاني شي triggerClientEvent('onClick', source) source = غير معرف Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 اول شي يقدر يطلع و يدخل و يروح الوقت و انتهيني ثاني شيtriggerClientEvent('onClick', source) source = غير معرف طيب صححه و يقدر يحط التايمر مع الفنكشن الي طرحته له اول والساورس يكون معرف <3 Link to comment
AboShanab Posted October 6, 2014 Share Posted October 6, 2014 إذا كان التايمر سيرفر تخلي الفكشن كذا function ( player ) player = يمديك تغيرها لـ اي متغير + لو كان كلنت تخلي الفكشن فاضي وداخل الفكشنات تحط localPlayer لانها تكون معرفه ^ Link to comment
King12 Posted October 6, 2014 Share Posted October 6, 2014 اول شي يقدر يطلع و يدخل و يروح الوقت و انتهيني ثاني شيtriggerClientEvent('onClick', source) source = غير معرف السورس دايم معرف على آنه آلمنت اللاعب او سياره مهما كان Link to comment
فاّرس Posted October 6, 2014 Share Posted October 6, 2014 السورس دايم معرف على آنه آلمنت اللاعب او سياره مهما كان لا حبيبي غلطان , السورس يكون معرف حسب الحدث . Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 السورس بإختصار هو المصدر الي صاير عنده الشيء مثلا شوف هذا الحدث onPlayerJoin كاتب لك السورس هو اللاعب الي خش " بصفحة الويكي " ء وواضحه اصلا مصدر الحدث هو اللاعب واي حدث بالسيرفر يكون فيه vehicle المصدر هو المركبه الي صار عندها الحدث Link to comment
فاّرس Posted October 6, 2014 Share Posted October 6, 2014 بمعنى آخر كودك السورس فيه غير معرف . ^^ Link to comment
nxFairlywell Posted October 6, 2014 Share Posted October 6, 2014 بمعنى آخر كودك السورس فيه غير معرف . ^^ ياخي انتم تحجرون للواحد الين يطيح وينكشف وضعه امم طيب يقدر يحط التايمر مع الوظيفة حق حدث الترايقر؟ Link to comment
فاّرس Posted October 7, 2014 Share Posted October 7, 2014 الحين فهمني اولا انت مرسل تريقر للكلينت وحاط فيه اكواد سيرفر , كيف تجي ؟ انا ما احجر لك انا اوضح له اخطائك عشان تستفيد Link to comment
nxFairlywell Posted October 7, 2014 Share Posted October 7, 2014 (edited) الحين فهمني اولا انت مرسل تريقر للكلينت وحاط فيه اكواد سيرفر , كيف تجي ؟ انا ما احجر لك انا اوضح له اخطائك عشان تستفيد ياخي امزح معك , و بالنسبه لل اول سطر من الي كتبته انا مرسل ترايقر للكلينت داخل حدث ترايقر من كلنت لسيرفر يعني الي اقصده والزبده انه يكون ملف سيرفر كذا function check( ) ACCOUNT = getAccountName(getPlayerAccount(source)) if not ( isObjectInACLGroup("user."..ACCOUNT, aclGetGroup("Admin-ex") ) ) then triggerClientEvent("onClick", source) else outputChatBox("انت مخالف ماتقدر ترقي نفسك *", source,255,255,255,true) setTimer( function( source ) triggerClientEvent("onClick", source) removeEventHandler("newEvent", root, check) end, 60000*60*20,1,true) end end) addEventHandler("newEvent", root, check) addEvent("newEvent",true) Edited October 7, 2014 by Guest Link to comment
فاّرس Posted October 7, 2014 Share Posted October 7, 2014 اها , اسف فهمتك غلط , وعادي احنا اخوان نمزح ونفل امها + ضيف السورس داخل فنكشن التايمر . Link to comment
nxFairlywell Posted October 7, 2014 Share Posted October 7, 2014 اها , اسف فهمتك غلط , وعادي احنا اخوان نمزح ونفل امها + ضيف السورس داخل فنكشن التايمر . يعطيك العافيه حبيبي Link to comment
mR.Z Posted October 7, 2014 Author Share Posted October 7, 2014 فأأتحين حرب بألموضوع الحين وش الحل Link to comment
AboShanab Posted October 7, 2014 Share Posted October 7, 2014 triggerClientEvent("onClick", source) ?? triggerClientEvent(source, "onClick", source) + removeEventHandler("newEvent", root, check) ?? Link to comment
nxFairlywell Posted October 7, 2014 Share Posted October 7, 2014 triggerClientEvent("onClick", source)?? triggerClientEvent(source, "onClick", source) + removeEventHandler("newEvent", root, check) ?? وش ذي الرموز؟؟؟ بعدين الترايقر من سيرفر لكلنت مو لازم اول ارقمنت ارجع للويكي وتأكد triggerClientEvent ( [table/element sendTo=getRootElement()], string name, element sourceElement, [arguments...] ) اتمنى الي يبي يساعد الرجال بدون رموز يكتب الخطأ ويصححه وبلاش الواحد يسوي نفسه فاهم 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