Jump to content

حفظ اسلحة ممنوعه


DaHoM

Recommended Posts

السلام عليمن ورحمة الله وبركاتة 

اخباركم يا شباب 

ابي اعرف ليش  ما يرضى لما يومت الاعبي يروح الخلاط 

كود حفظ الاسلحة 

-- 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
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
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
On 12/14/2017 at 20:12, #Soking said:

ممكن توفر تعبك و تستخدم الكود دا بس انا ما انصحك , يعني لوب كل رسبون

أخي سوكينق 

ما اظن يزبط الكود حقك ومود حفظ الاسلحة يحفظ اصلاً الخلاطات 

بصير لخبطه فلهذا حسب ظني ما رح يزبط 

Edited by iyaad
Link to comment

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...