Mando Posted January 26, 2014 Share Posted January 26, 2014 السلام عليكم ورحمة الله وبركاتة بسم الله الرحمن الرحيم انا عايز احفظ التيمات لو خرجت من سيرفر ودخلت وسجلت دخولي يحفظ التيم ! وش استخدم ؟؟ Link to comment
iPrestege Posted January 26, 2014 Share Posted January 26, 2014 السلام عليكم ورحمة الله وبركاتةبسم الله الرحمن الرحيم انا عايز احفظ التيمات لو خرجت من سيرفر ودخلت وسجلت دخولي يحفظ التيم ! وش استخدم ؟؟ setAccountData getAccountData getPlayerAccount getPlayerTeam getTeamFromName setPlayerTeam addEventHandler 'onPlayerQuit' -- Event 'onPlayerLogin' -- Event 'onPlayerLogout' -- Event Link to comment
Mando Posted January 26, 2014 Author Share Posted January 26, 2014 السلام عليكم ورحمة الله وبركاتةبسم الله الرحمن الرحيم انا عايز احفظ التيمات لو خرجت من سيرفر ودخلت وسجلت دخولي يحفظ التيم ! وش استخدم ؟؟ setAccountData getAccountData getPlayerAccount getPlayerTeam getTeamFromName setPlayerTeam addEventHandler 'onPlayerQuit' -- Event 'onPlayerLogin' -- Event 'onPlayerLogout' -- Event كل دة ؟؟؟؟؟؟؟؟ بس كتير بحاول ! Link to comment
iPrestege Posted January 26, 2014 Share Posted January 26, 2014 حاول و ان شاء الله مايقصرون الشباب .. Link to comment
Mando Posted January 26, 2014 Author Share Posted January 26, 2014 المشكلة اني معرف لايء شيء setAccountData getAccountData getPlayerAccount من هذول ! Link to comment
EH10 Posted January 26, 2014 Share Posted January 26, 2014 شـرح * https://forum.multitheftauto.com/viewtopic.php?f=164&t=62247 Link to comment
Mando Posted January 26, 2014 Author Share Posted January 26, 2014 شكرآ لكن مارح اعرف اسويه بحاول واذا طلع مو صح لا تقولون هريسة Link to comment
EH10 Posted January 26, 2014 Share Posted January 26, 2014 جـرب * addEventHandler("onPlayerQuit",root, function() local CooL = getPlayerAccount(source) if isGuestAccount(CooL) then return end setAccountData(CooL,"Team",getPlayerTeam(source)) end ) addEventHandler("onPlayerLogin",root, function(_,col) local CoOoL = getAccountData(col,"Team") if ( CoOoL ) then setPlayerTeam(source,CoOoL) end end ) Link to comment
iPrestege Posted January 26, 2014 Share Posted January 26, 2014 جـرب * addEventHandler("onPlayerQuit",root, function() local CooL = getPlayerAccount(source) if isGuestAccount(CooL) then return end setAccountData(CooL,"Team",getPlayerTeam(source)) end ) addEventHandler("onPlayerLogin",root, function(_,col) local CoOoL = getAccountData(col,"Team") if ( CoOoL ) then setPlayerTeam(source,CoOoL) end end ) فية اخطاء بسيطة .. تحفظ التيم نفسة ماراح تقدر تسترجعه وكيف بتتتعرف عليه ^ احفظ اسم التيم واسترجعه وجيب التيم من اسمة .. مثال بسيط : addCommandHandler ( 'gSave', function ( gPlayer ) local gAcc = getPlayerAccount ( gPlayer ) if gAcc and not isGuestAccount ( gAcc ) and getPlayerTeam ( gPlayer ) then setAccountData ( gAcc,'gTeam',getTeamName ( getPlayerTeam ( gPlayer ) ) ) outputChatBox ( '* Your Team Was Saved',gPlayer,255,255,0 ) end end ) addCommandHandler ( 'gRestore', function ( gPlayer ) local gAcc = getPlayerAccount ( gPlayer ) if gAcc and not isGuestAccount ( gAcc ) then local gTeamName = getAccountData ( gAcc,'gTeam' ) if gTeamName then setPlayerTeam ( gPlayer,getTeamFromName ( tostring ( gTeamName ) ) ) outputChatBox ( '* Your Team Was Restored',gPlayer,0,255,0 ) end end end ) Link to comment
#DRAGON!FIRE Posted January 26, 2014 Share Posted January 26, 2014 addEventHandler( "onPlayerQuit", root, function( ) local PlayerAcc = getPlayerAccount ( source ) if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) end end ) addEventHandler( "onPlayerLogin", root, function( ) local PlayerAcc = getPlayerAccount ( source ) local Team = getAccountData( PlayerAcc, "PlayerTeam" ) if ( Team ) then setPlayerTeam ( source, getTeamFromName ( tostring ( Team ) ) ) outputChatBox ( "** You Join Team:"..Team, source, 0, 255, 0, true ) end end ) Link to comment
iPrestege Posted January 26, 2014 Share Posted January 26, 2014 addEventHandler( "onPlayerQuit", root, function( ) local PlayerAcc = getPlayerAccount ( source ) if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) end end ) addEventHandler( "onPlayerLogin", root, function( ) local PlayerAcc = getPlayerAccount ( source ) local Team = getAccountData( PlayerAcc, "PlayerTeam" ) if ( Team ) then setPlayerTeam ( source, getTeamFromName ( tostring ( Team ) ) ) outputChatBox ( "** You Join Team:"..Team, source, 0, 255, 0, true ) end end ) عند تسجيل الدخول فية بارتمنت خاص بالاكاونت ماله داعي تستدعي وتلف وتدور .. بالنسبة لـ استعاده التيم للاعب لو تتحقق انة التيم موجود في السيرفر اصلاً يكون أفضل تجنباً للـآخطــاء .. 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