Jump to content

login log


Recommended Posts

السلام عليكم

الفكره :

يكون فيه لوحه

يطلع آخر آمره دخل فيها اللاعب

طبعاً آنا آحدد الحسابات ,

طبعا مقصد متى اخر مره دخل فيها بالتاريخ والوقت.

يعني زي كذا

Name Last Login

King12 2/8/2013

Test11 27/7/2013

تكون بلوحه gui

Link to comment

هذا فنكشن يجيب الوقت

function Time() 
 local time = getRealTime() 
  local second,minute,hour,day,month,year = time.second,time.minute,time.hour,time.monthday ,time.month + 1,time.year + 1900 
  if hour <= 0 then x = "AM" else x = "PM" end 
    hour = math.floor(hour / 12) - 1 
      if hour == 0 then hour = "12" end 
     local time = math.floor(math.abs(hour))..":"..minute..":"..second.." "..tostring(x).." "..day.."/"..month.."/"..year 
 return time 
end 

Link to comment
timelabel = guiCreateLabel(240, 50, 70, 36, "Original:", false) 
  
function onPlayerQuit ( ) 
      -- when a player leaves, store his current money amount in his account data 
      local playeraccount = getPlayerAccount ( source ) 
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in 
      local time = getRealTime() 
      local hours = time.hour 
      local minutes = time.minute 
           setAccountData ( playeraccount, "king12.lastquit", playerlastquit ) -- save it in his account 
           -- guiSetText(timelabel,'Your last visit:'..hours.. '' ..minutes) 
      end 
end 
  
function onPlayerLogout (_, playeraccount ) 
      local playeraccount = getPlayerAccount ( source ) 
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in 
      local time = getRealTime() 
      local hours = time.hour 
      local minutes = time.minute 
           setAccountData ( playeraccount, "king12.lastquit", playerlastquit ) -- save it in his account 
           -- guiSetText(timelabel,'Your last visit:'..hours.. '' ..minutes) 
      end 
end 
  
addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) 
addEventHandler ( "onPlayerLogout", getRootElement ( ), onPlayerLogout) 
  
function onPlayerLogin ( ) 
    local playeraccount = getPlayerAccount ( source ) 
    if ( playeraccount ) and not isGuestAccount ( playeraccount ) then 
    getAccountData ( playeraccount, "king12.lastquit", playerlastquit ) 
    guiSetText(timelabel,'Your last visit:'..hours..''..minutes) 
    end 
end 
addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin) 

هذا اللي عرفت اسويه بس ماطلع عندي اخطاء بالديبوق ولا نوى يضبط

Link to comment

لول انا قبل كم يوم سويت سكربت قريب لـ فكرتك بس

هو يحفظ الوقت الكلي بالايام والساعات والدقائق والثواني وزياده على هذا يحفظ الوقت الي كنت داخل فيه

بهذا الترتيب yyyy/m/dd hh:mm:ss

لما تدخل لحسابك يقولك الوقت الكلي الي كنت فيه بالسيرفر , وآخر مره سجلت فيها الدخول على حسابك

* Your total time is 4 seconds and 0 minutes and 0 hours and 0 days.

* Last login was in 2013/7/27 6:14:6

Link to comment
لول انا قبل كم يوم سويت سكربت قريب لـ فكرتك بس

هو يحفظ الوقت الكلي بالايام والساعات والدقائق والثواني وزياده على هذا يحفظ الوقت الي كنت داخل فيه

بهذا الترتيب yyyy/m/dd hh:mm:ss

لما تدخل لحسابك يقولك الوقت الكلي الي كنت فيه بالسيرفر , وآخر مره سجلت فيها الدخول على حسابك

* Your total time is 4 seconds and 0 minutes and 0 hours and 0 days.

* Last login was in 2013/7/27 6:14:6

ياليت تعطيني السكربت اذا انت نشرته ولا شي

+

ضيفني ع السكايب آبيك : King12pro

Link to comment
الحين انت تبيه كيف ؟

يعني تبي اذا سجلت الدخول يطلع لك اخر مره سجلت فيها ؟

ولا تبي تجيب اللاعبين متى آخر مره سجلوا ؟

+ كيف تبيها جريد ليست ولا ؟

قريد ليست مهما كان

لكن يكون فيه لوحه يفتحها الادمن

واحدد حسابات انا بنفسي

يطلع لي متى اخر مره دخلوا

يفضل قريد ليست ^^

Link to comment
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...