DaHoM Posted December 14, 2017 Share Posted December 14, 2017 السلام عليمن ورحمة الله وبركاتة اخباركم يا شباب ابي اعرف ليش ما يرضى لما يومت الاعبي يروح الخلاط كود حفظ الاسلحة -- server said addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end end); addEventHandler("onPlayerLogin", root, function(_, account) for slot = 1, 12 do local wep = getAccountData(account, "WeaponID"..slot) local ammo = getAccountData(account, "Ammo"..slot) if wep and ammo then giveWeapon(source, wep, ammo) end end end); addEventHandler("onPlayerWasted", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end end) addEventHandler("onPlayerSpawn", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do local wep = getAccountData(account, "WeaponID"..slot) local ammo = getAccountData(account, "Ammo"..slot) if wep and ammo then giveWeapon(source, wep, ammo) takeWeapon( source, 38, 4, 35, 36, 37 ) end end end end) Link to comment
iyaad Posted December 14, 2017 Share Posted December 14, 2017 addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 2, 6 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end end); addEventHandler("onPlayerLogin", root, function(_, account) for slot = 2, 6 do local wep = getAccountData(account, "WeaponID"..slot) local ammo = getAccountData(account, "Ammo"..slot) if wep and ammo then giveWeapon(source, wep, ammo) end end end); addEventHandler("onPlayerWasted", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 2, 6 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end end) addEventHandler("onPlayerSpawn", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 2, 6 do local wep = getAccountData(account, "WeaponID"..slot) local ammo = getAccountData(account, "Ammo"..slot) if wep and ammo then giveWeapon(source, wep, ammo) end end end end) حفظ اسلحة من الايدي 2 الى 6 مو من 1 الى 12 https://wiki.multitheftauto.com/wiki/Weapons Link to comment
XML Posted December 14, 2017 Share Posted December 14, 2017 @DaHoM انت تبيه اذا مات يشيل الخلاط منه ؟ او تبيه يحفظه ؟ Link to comment
#Soking Posted December 14, 2017 Share Posted December 14, 2017 addEventHandler( 'onPlayerSpawn', root, function( ) for _, v in ipairs( { 4, 36, 38, 35, 37, 42, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14, 18, 41 } ) do takeWeapon( source, v ) end end ) ممكن توفر تعبك و تستخدم الكود دا بس انا ما انصحك , يعني لوب كل رسبون Link to comment
iyaad Posted December 16, 2017 Share Posted December 16, 2017 (edited) On 12/14/2017 at 20:12, #Soking said: ممكن توفر تعبك و تستخدم الكود دا بس انا ما انصحك , يعني لوب كل رسبون أخي سوكينق ما اظن يزبط الكود حقك ومود حفظ الاسلحة يحفظ اصلاً الخلاطات بصير لخبطه فلهذا حسب ظني ما رح يزبط Edited December 16, 2017 by iyaad 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