Jump to content

momar5700

Members
  • Posts

    381
  • Joined

  • Last visited

Everything posted by momar5700

  1. الحين اشتغل وصار حلو بس ش صار طارت رتبت كونسل ياخي الحين وش وظيفت ده if (v ~= "Console" or v ~= "Managers" or v ~= "Maps") then ياخي انا مابيه تكون ابيهتكون لما ترقي رتبه اخري ماتحدف كل رتبات لا في رتبات ماتتحدف زي رتبت مانججرس كونسل فهمت اسف علي انا اتعبك والمود الاصلي هادا هو https://community.multitheftauto.com/ind ... ls&id=9832 بس مشكلته نفس المشكله الاولا الحين كيف اصلحها
  2. ظهرت مشكله وهي ادوس ترقيه مايرقي ابدا ودي بق صار يقول لي كدا
  3. يعني لما مثلا ترقي نفسك مود وتيجي مره اخري وترقي نفسك بي مود2 تفضل معك 2 رتبه انا ابيه لما ترقي رتبت مود 2 تروح ععنك رتبت مود1 وهاكدا فهمت
  4. ايه اشتغل الحين صار يرقي بس ظهرت مشكله وهي رتبات تتكرر لمادا؟
  5. الحين سيرفر الاول لما يرقي يعضيك رتبه ولما ترقي رتبه تانيه تكون معك رتبتين وسيرفر الاول مافيه الي هو حج المخالفة وسيرفر الاول مافيه الي لما تكون معك رتبت كونسل او مانجرس وترقي يعضيك رتبه بس ماطير رتبت كونسل فا سيرفر 2 فيه كل ده فهمت ليه انا محتاجه
  6. يعني انت ماتقدر تصلح مشكلة؟
  7. الحين دي بق يقول لي لا تقول لي كمان محظور دي بق بعد ماضغط ترقية
  8. يعني الحين ماتقدر تعرف لي وش مشكله ها ولا ايش
  9. شف الحين المود هو نفسة اول شيء لما كان سيرفر ----------------------- -- ** Buy Admin's Script -- Created By Mr.omar -- Ver 1.0.0 -- Mail : [email protected] -- [url=http://www.gta-arabs.com]www.gta-arabs.com[/url] ---------------------- 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,'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,255,0,255,true); else outputChatBox("# الرجاء اكمال التواجد",source,255,0,255,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) الحين لما كدا كان شغال ادوس ترقيه يعضيني رتبه فعلا بس لما غيرته الكود لي كدا ----------------------- -- ** Buy Admin's Script -- Created By Mr.Pres[T]ege -- Ver 1.0.0 -- Mail : [email protected] -- [url=http://www.gta-arabs.com]www.gta-arabs.com[/url] ---------------------- xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("انت لم تسجل بالسيرفر",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لا يمكنك اختيار الرتبه لانه فعلا معك",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin-EX")) then return outputChatBox("انت مخآلف لايمكنك الحصول على رتبه",source,238,158,73,true); 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 for _,rn in ipairs(Ranks) do if ( aclGetGroup(rn[1]) ) then if ( isObjectInACLGroup("user."..account.."",aclGetGroup(rn[1])) ) then if ( rn[1] ~= "Console" and rn[1] ~= "Managers" and rn[1] ~= "Maps" ) then aclGroupRemoveObject(aclGetGroup(rn[1]),"user."..account) end end end end aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("مبروك لقد حصلت على الرتبه "..Name,source,238,158,73,true); else outputChatBox("عدد ساعاتك غير كافيه",source,238,158,73,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) مايرقي ادوس ترقيه مافي لاكن لما ارجع الكود يشتغل يعني المشكله مو بالمود مشكله بي سيرفر والمود ضايفة بقروب الادمن
  10. طيب انا الحين وش اسوي طيب لو ما راح تسعدوني باهي ابي طلب تاني وصغير الحين انا اخد لوحة ترقيات وعلت عليها لما كان ملف سيرفر كدا كا ن شغال ----------------------- -- ** Buy Admin's Script -- Created By Mr.omar -- Ver 1.0.0 -- Mail : [email protected] -- [url=http://www.gta-arabs.com]www.gta-arabs.com[/url] ---------------------- 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,'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,255,0,255,true); else outputChatBox("# الرجاء اكمال التواجد",source,255,0,255,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) كان يرقي ويعضي رتبه بس لما غيرته لي كدا مارضي يرقي رتب وش مشكله ادوس ترقية مايرقي هاد ملف سيرفر بعد ماغيرته ----------------------- -- ** Buy Admin's Script -- Created By Mr.Pres[T]ege -- Ver 1.0.0 -- Mail : [email protected] -- [url=http://www.gta-arabs.com]www.gta-arabs.com[/url] ---------------------- xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("انت لم تسجل بالسيرفر",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لا يمكنك اختيار الرتبه لانه فعلا معك",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin-EX")) then return outputChatBox("انت مخآلف لايمكنك الحصول على رتبه",source,238,158,73,true); 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 for _,rn in ipairs(Ranks) do if ( aclGetGroup(rn[1]) ) then if ( isObjectInACLGroup("user."..account.."",aclGetGroup(rn[1])) ) then if ( rn[1] ~= "Console" and rn[1] ~= "Managers" and rn[1] ~= "Maps" ) then aclGroupRemoveObject(aclGetGroup(rn[1]),"user."..account) end end end end aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("مبروك لقد حصلت على الرتبه "..Name,source,238,158,73,true); else outputChatBox("عدد ساعاتك غير كافيه",source,238,158,73,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) الحين وش مشكله ممكن حل لها لو سمحتم
  11. لما دوس حدف توزيع يعمل حدف بس توقيت الموجود فهمت يعني الحين ابي لما ادوس حدف توزيع يسوي حدف بس لما ادوس مايسوي ولما اغير كود من توقيت ودوس حدف يشتغل ممكن مساعدة
  12. سلام عليكم طيب الحين لو مافي احد بيساعدنا ممكن تحضون في الكود ده وقت لما انا اكتبه مثلا ساعة ينتهي توزيع في ساعة كدا يعني
  13. طيب هادا هو اكوا -- Server Side : --[[ ------------------------------------------------- original script credits to Yakuza.Real and solidsnake and kenix viewtopic.php?f=91&t=40132 ------------------------------------------------- booo just fix it momat5600: Remake the script using ( SQL ) To Save it . ]] exports.scoreboard:addScoreboardColumn('PlayTime') addEvent("addTime",true) addEvent("removeTime",true) addEvent("ToServer",true) addEventHandler("onResourceStart",resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS Prestege2_Save_Time ( PlayerAccount,Hours,Minuts,Seconds,PlayAllTime )" ) outputDebugString ("Execute SQL Loadded !") end ) local t = { } local w = {} addEventHandler("ToServer",root, function (word,get,time) if word and tonumber(get) and tonumber(time) then table.insert(w,{word,get}) setTimer(function () for _,v in ipairs(w) do if v[1] == word and v[2] == get then table.remove(w,i) end end end,time*60*60*1000,1) end end ) addEventHandler("onConsole",root, function (msg) for _,v in ipairs(w) do if msg == v[1] then local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then if not getAccountData ( playeraccount, "time-"..msg) then addPlayerTime(source,v[2]) setAccountData( playeraccount, "time-"..msg,true) outputChatBox ("تم اعطائك ساعات", source, 0, 255, 0) else outputChatBox ("مود توزيع السساعات مقفل", source, 255, 0, 0) end end end end end ) addEvent('removeCommand',true) addEventHandler('removeCommand',root, function(commandName) for i,v in pairs(getElementsByType('player')) do removeCommandHandler(commandName,commandd) outputChatBox('* تمم انتههاء التوززيع وشكرا #',v,0,255,0,false) accountt = getPlayerAccount(v) setAccountData(accountt,'havee',false) end end ) addEventHandler('onResourceStart',resourceRoot, function() for i,v in pairs(getElementsByType('player')) do accountt = getPlayerAccount(v) setAccountData(accountt,'havee',false) outputChatBox('* Script By mr.omar',v,0,255,0,false) end end ) addEventHandler("addTime",root, function (to,time) if to == "all" then for _,v in ipairs(getElementsByType("player")) do addPlayerTime(v,time) outputChatBox ("تم توزيع "..time.." ساعة لـ جميع اللاعبين",v,255,0,0,true ) end else plr = getPlayerFromName(to) if plr then addPlayerTime(plr,time) outputChatBox ("تم أضافة "..time.." ساعة الى حسابككـ!",plr,255,0,0,true ) end end end ) addEventHandler("removeTime",root, function (to,time) if to == "all" then for _,v in ipairs(getElementsByType("player")) do removePlayerTime(v,time) outputChatBox ("تم حذف "..time.." ساعة من جمييع الاعبين",v,255,0,0,true ) end else plr = getPlayerFromName(to) if plr then removePlayerTime(plr,time) outputChatBox ("تم حذف "..time.." ساعة من حسآبككـ ",plr,255,0,0,true ) end end end ) function addPlayerTime(plr,time) time = math.floor(time) t[plr]['hour'] = tonumber(t[plr]['hour'] or 0) + time end function removePlayerTime(plr,time) time = math.floor(time) t[plr]['hour'] = tonumber(t[plr]['hour'] or 0) - time end function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "PlayTime", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function SaveDataOnQuit () local acc = getPlayerAccount (source) if not isGuestAccount (source) then local sValue = getElementData( source,'PlayTime' ) local hour = tonumber( t[ source ][ 'hour' ] or 0 ) local min = tonumber( t[ source ][ 'min' ] or 0 ) local sec = tonumber( t[ source ][ 'sec' ] or 0 ) local accountName = getAccountName (acc) local Results = executeSQLQuery("SELECT * FROM Prestege2_Save_Time WHERE PlayerAccount=?", accountName) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO Prestege2_Save_Time ( PlayerAccount,Hours,Minuts,Seconds,PlayAllTime ) VALUES(?,?,?,?,?)", accountName,hour,min,sec,sValue ) else executeSQLQuery('UPDATE Prestege2_Save_Time SET Hours =?, Minuts =?, Seconds =?, PlayAllTime =? WHERE PlayerAccount =?', hour, min, sec, sValue, accountName) end t[ source ] = nil end end addEventHandler ("onPlayerQuit", root, SaveDataOnQuit) function SaveDataOnStop () for _,v in ipairs (getElementsByType ("player")) do if not isGuestAccount (getPlayerAccount (v)) then local acc = getPlayerAccount (v) local sValue = getElementData( v,'PlayTime' ) if not ( t [ v ] ) then t [ v ] = { } end local hour = tonumber( t[ v ][ 'hour' ] or 0 ) local min = tonumber( t[ v ][ 'min' ] or 0 ) local sec = tonumber( t[ v ][ 'sec' ] or 0 ) local Results = executeSQLQuery("SELECT * FROM Prestege2_Save_Time WHERE PlayerAccount=?", getAccountName (acc)) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO Prestege2_Save_Time ( PlayerAccount,Hours,Minuts,Seconds,PlayAllTime ) VALUES(?,?,?,?,?)", getAccountName (acc), hour,min,sec,sValue) else executeSQLQuery('UPDATE Prestege2_Save_Time SET Hours =?, Minuts =?, Seconds =?, PlayAllTime =? WHERE PlayerAccount =?', hour, min, sec, sValue, getAccountName (acc)) end end end end addEventHandler ("onResourceStop", resourceRoot, SaveDataOnStop) function GetDataOnStart () for _,v in ipairs (getElementsByType ("player")) do if not isGuestAccount (getPlayerAccount (v)) then local acc = getPlayerAccount (v) local Results = executeSQLQuery("SELECT * FROM Prestege2_Save_Time WHERE PlayerAccount=?", getAccountName (acc)) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then return end if not t[ v ] then t[ v ] = {} end t[ v ]["hour"] = tonumber(Results[1]["Hours"]) t[ v ]["min"] = tonumber(Results[1]["Minuts"]) t[ v ]["sec"] = tonumber(Results[1]["Seconds"]) end end end addEventHandler("onResourceStart", resourceRoot, GetDataOnStart) function GetDataOnLogin (_, acc) local Results = executeSQLQuery("SELECT * FROM Prestege2_Save_Time WHERE PlayerAccount=?", getAccountName (acc)) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then return end setElementData (source, "PlayTime", Results[1]["PlayAllTime"]) if not t[ source ] then t[ source ] = {} end t[ source ]["hour"] = tonumber(Results[1]["Hours"]) t[ source ]["min"] = tonumber(Results[1]["Minuts"]) t[ source ]["sec"] = tonumber(Results[1]["Seconds"]) end addEventHandler ("onPlayerLogin", root, GetDataOnLogin) شف انا لما احط كود ده addEvent('setCommand',true) addEventHandler('setCommand',root, function(commandName,hourr) for i,v in pairs(getElementsByType('player')) do accountt = getPlayerAccount(v) outputChatBox('* تم وضع توزيع جديد اكتب في اف8 '..commandName..' - Hour : '..hourr..'',v,255,0,0,false) setAccountData(accountt,'havee',false) function commandd(thePlayer) accountt = getPlayerAccount(thePlayer) if ( getAccountData(accountt,'havee') == false ) then hour = tonumber( t[ thePlayer ][ 'hour' ] or 0 ) t[thePlayer]["hour"] = tonumber(hourr) + tonumber(hour) accountt = getPlayerAccount(thePlayer) setAccountData(accountt,'havee',true) outputChatBox('* تم اعطاك ساعات #',thePlayer,255,0,0,false) else outputChatBox('* تم اعطاك من قبل وشكرا لك #',thePlayer,255,0,0,false) end end addCommandHandler(commandName,commandd) end end ) addEventHandler('onPlayerJoin',root, function() commandd(source) end ) بدل من كود الي بالوقت يشتغل بس مشكله انا ابيه انتهاء بالوقت الي انا احدده وبعدين لما اكون ابي احدف توزيع احدفه عادي فاهمت
  14. طيب ممكن تساعدني لاني حاولت وفشلت ممكن
  15. تم تعديل بس كنت بعدل الموضوع لو ماتيس تعديني مو مشكله انا سسويته علي انه يوزع بس مافي وقت لانتها توزيع علشان تسوي انتهاء توزيع لازم تكتب كلمه وتودس انتهاء توزيع الي بلوحة بس انا اتمناء تسوه لي
  16. سلام عليكم ورحة الله وبركاته مشكله هي انه ابي لما يدوس حدف كلمه الي توزع ساعات يحدفها بس مايحدفها وش مشكله ها توزيع ساعات local t = { } local w = {} addEventHandler("ToServer",root, function (word,get,time) if word and tonumber(get) and tonumber(time) then table.insert(w,{word,get}) setTimer(function () for _,v in ipairs(w) do if v[1] == word and v[2] == get then table.remove(w,i) end end end,time*60*60*1000,1) end end ) addEventHandler("onConsole",root, function (msg) for _,v in ipairs(w) do if msg == v[1] then local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then if not getAccountData ( playeraccount, "time-"..msg) then addPlayerTime(source,v[2]) setAccountData( playeraccount, "time-"..msg,true) outputChatBox ("تم اعطائك ساعات", source, 0, 255, 0) else outputChatBox ("مود توزيع السساعات مقفل", source, 255, 0, 0) end end end end end ) ها حدف كلمه بس ماينحدف وش مشكله addEvent('removeCommand',true) addEventHandler('removeCommand',root, function(commandName) for i,v in pairs(getElementsByType('player')) do removeCommandHandler(commandName,commandd) outputChatBox('* تمم انتههاء التوززيع وشكرا #',v,0,255,0,false) accountt = getPlayerAccount(v) setAccountData(accountt,'havee',false) end end ) واسف علي الازعاج
  17. خلاص انا مابي علي حاهز ابيك تعلمني وش اسوي وكيف اعدل وكلام ده وكدا تكون عملت معنا معروف
  18. طيب كيف نعدل انت تعرف لها ممكن تعلن وش راح تخسر
  19. شباب حتي انا ابي اسوي كدا مافي حد يعرف لها ولا حتي طريقة لها
  20. طيب انا اعرف اسوي الوحة والمكان الي يجي فيه علشان تيجي لها الوحة بس ابي لما يضغط علي مثل بيسي تيجي له صور ببسي ويضغط شراء يشتري ببسي بس لما يشتري تظهر لها في يده ببسي ويطغط حرف ز يشربه وعد ضغطه 3 مرات تروح عنه ببسي كيف اسويها
  21. طيب ين احطه وبعدين انا طالب في نفس مود اكواده كمان
  22. سلام عليكم ورحمة الله وبركاته انا دورت علي مود ده في نت وماحصلته ممكن تعضوني مود او ايش اسمه او اكواده لاني ماحصلته ممكن مشكرين الي راح يساعدونا موضروري يكون نفس الي بصورة بس ابي مود
  23. ماني فاهم عليك وضح اكثر
×
×
  • Create New...