aL.Kfo Posted March 3, 2014 Share Posted March 3, 2014 (edited) بسـم ألله الرحمن الرحيم ألـسلام عليكم اخـوأني لـدي مشكلـه فـي حفظ النجـوم ابلشـتني جـربت كذا كود مـوو رأضي جربت سيف سستم و كذالكك ذا الموضوع جربت كل الاكواد تبع الأخ عنـأد viewtopic.php?f=160&t=62278 ولأ ادري وش الحل Edited March 3, 2014 by Guest Link to comment
Arnold-1 Posted March 3, 2014 Share Posted March 3, 2014 function onLeave (thePlayer) local level = getPlayerWantedLevel(thePlayer) if isGuestAccount then return end local account = getPlayerAccount(thePlayer) setAccountData(account,"wanted",level) end addEventHandler("onPlayerQuit",root,onLeave) function onLogin (thePlayer) local account = getPlayerAccount local level = getAccountData(account,"wanted") setPlayerWantedLevel(thePlayer,level) end addEventHandler("onPlayerLogin",root,onLogin) Link to comment
The Killer Posted March 3, 2014 Share Posted March 3, 2014 (edited) ^ خرابيط Edit # جرب ذا function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") setTimer (setPlayerWantedLevel, 50, 1, source, playerWanted) end end addEventHandler("onPlayerLogin",root,playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) end end end addEventHandler("onPlayerQuit",root,onQuit) Edited March 3, 2014 by Guest Link to comment
aL.Kfo Posted March 3, 2014 Author Share Posted March 3, 2014 function onLeave (thePlayer) local level = getPlayerWantedLevel(thePlayer) if isGuestAccount then return end local account = getPlayerAccount(thePlayer) setAccountData(account,"wanted",level) end addEventHandler("onPlayerQuit",root,onLeave) function onLogin (thePlayer) local account = getPlayerAccount local level = getAccountData(account,"wanted") setPlayerWantedLevel(thePlayer,level) end addEventHandler("onPlayerLogin",root,onLogin) حطيته سيرفر م ضبط Link to comment
aL.Kfo Posted March 3, 2014 Author Share Posted March 3, 2014 ^ خرابيطEdit # جرب ذا function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") setTimer (setPlayerWantedLevel, 50, 1, source, playerWanted) end end addEventHandler("onPlayerLogin",root,playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) end end end addEventHandler("onPlayerQuit",root,onQuit) م ضبط طبعـأ م اتوقع المشكله من كودكك لين جربت اكواد واجد ما ضبط بس بسالك م ينفع تسوي تايمر يعني بعد موت الاعب ب كم ثانيه ترجع النجوم لين يمقن فيه شي يمسحها قبل الكود يرجعها وكذا Link to comment
The Killer Posted March 3, 2014 Share Posted March 3, 2014 طيب جرب function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") setTimer (setPlayerWantedLevel, 1000, 1, source, playerWanted) end end addEventHandler("onPlayerLogin",root,playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) end end end addEventHandler("onPlayerQuit",root,onQuit) addEventHandler("onPlayerSpawn", root, function () local playerWanted = getAccountData (source, "funmodev2-wantedlevel") if (playerWanted) then setTimer (setPlayerWantedLevel, 1000, 1, source, playerWanted) end end ) Link to comment
aL.Kfo Posted March 3, 2014 Author Share Posted March 3, 2014 طيب جرب function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") setTimer (setPlayerWantedLevel, 1000, 1, source, playerWanted) end end addEventHandler("onPlayerLogin",root,playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) end end end addEventHandler("onPlayerQuit",root,onQuit) addEventHandler("onPlayerSpawn", root, function () local playerWanted = getAccountData (source, "funmodev2-wantedlevel") if (playerWanted) then setTimer (setPlayerWantedLevel, 1000, 1, source, playerWanted) end end ) نفس الششي Link to comment
The Killer Posted March 3, 2014 Share Posted March 3, 2014 والله مدري وش مسوي انت ولا شكلك مسوي مود ثاني لاأن الكود شغال معي Link to comment
aL.Kfo Posted March 3, 2014 Author Share Posted March 3, 2014 والله مدري وش مسوي انتولا شكلك مسوي مود ثاني لاأن الكود شغال معي خلاص عرفته بجربه الحين في سيرفر مافيه ولا مود بشوف المشكله مو المودات تبعي يمقن Link to comment
aL.Kfo Posted March 3, 2014 Author Share Posted March 3, 2014 الـمشكله كـأنت من ملف في احد المودات يعطيك الف عافيه ذا كيل و ضبط الكود ي عسسل تـم الافـأددة Link to comment
Arnold-1 Posted March 3, 2014 Share Posted March 3, 2014 طيب جرب function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") setTimer (setPlayerWantedLevel, 1000, 1, source, playerWanted) end end addEventHandler("onPlayerLogin",root,playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) end end end addEventHandler("onPlayerQuit",root,onQuit) addEventHandler("onPlayerSpawn", root, function () local playerWanted = getAccountData (source, "funmodev2-wantedlevel") if (playerWanted) then setTimer (setPlayerWantedLevel, 1000, 1, source, playerWanted) end end ) كودك زائد isGuestAccountليش الحاجة لـ onPlayerLogin Eventاذا كان الـ 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