Ahmed_Negm Posted July 7, 2016 Share Posted July 7, 2016 يجماعا ارجوا حل المشكلة انا عامل نظام امان بمود توزيع السعات اذا سجل لاعب خروج ينمسح الكولمن واذا سجل دخوله يرجع الكولمن المشكلة ان لما جيت اجربه علي العالمي لقيت اي حد سجل خروج الكولمن ينمسح من عن الكل واي حد يسجل دخوله الكولمن يرجع عند الكل الكود function SaveDataOnLogout ( ) exports.scoreboard:removeScoreboardColumn('Online' , getLocalPlayer ( )) end addEventHandler ("onPlayerLogout", getLocalPlayer ( ), SaveDataOnLogout) function GetDataOnLogin ( ) exports.scoreboard:addScoreboardColumn('Online' , getLocalPlayer ( )) addEventHandler ("onPlayerLogin", getLocalPlayer ( ), GetDataOnLogin) ارجوا الحل Link to comment
' A F . Posted July 7, 2016 Share Posted July 7, 2016 getLocalPlayer Client Only !! onPlayerLogin and onPlayerLogout Server Only !! Link to comment
Ahmed_Negm Posted July 7, 2016 Author Share Posted July 7, 2016 لو سمحتم ردو حراام كدا بأ Link to comment
فاّرس Posted July 7, 2016 Share Posted July 7, 2016 root ف الحدث الى getLocalPlayer() غير يمديك تختصر getLocalPlayer() > localPlayer Link to comment
Ahmed_Negm Posted July 7, 2016 Author Share Posted July 7, 2016 يشبح هيا في الأساس كانت رووت بس غيرتها للوكال الحمدلله محدش بيشتغل خالص ونسيت اصلآ ان لوكال للسلينت مش للسيرفر وانا لو سمحتم عايز حل كل مخلص ممن مشكلة تطلعلي غيرها Link to comment
فاّرس Posted July 7, 2016 Share Posted July 7, 2016 function SaveDataOnLogout ( ) exports.scoreboard:removeScoreboardColumn('Online' , source) end addEventHandler ("onPlayerLogout", root, SaveDataOnLogout) function GetDataOnLogin ( ) exports.scoreboard:addScoreboardColumn('Online' , source) end addEventHandler ("onPlayerLogin", root, GetDataOnLogin) Link to comment
Ahmed_Negm Posted July 7, 2016 Author Share Posted July 7, 2016 طب هيا سورس دي لازم تتعرف ولا Link to comment
Ahmed_Negm Posted July 7, 2016 Author Share Posted July 7, 2016 مش نجحو علي فكرا يشبح Link to comment
فاّرس Posted July 7, 2016 Share Posted July 7, 2016 ما يحتاج تعرف شي .. function onStart() for k,v in ipairs ( getElementsByType ( 'player' ) ) do if not isGuestAccount ( getPlayerAccount ( v ) ) then exports.scoreboard:addScoreboardColumn ( 'Online' , v ) end end end addEventHandler ( 'onResourceStart', resourceRoot, onStart ) function SaveDataOnLogout ( ) exports.scoreboard:removeScoreboardColumn('Online' , source) end addEventHandler ("onPlayerLogout", root, SaveDataOnLogout) function GetDataOnLogin ( ) exports.scoreboard:addScoreboardColumn('Online' , source) end addEventHandler ("onPlayerLogin", root, GetDataOnLogin) Link to comment
Ahmed_Negm Posted July 7, 2016 Author Share Posted July 7, 2016 انا تعبتك معايا معلش حجرب واشوف 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