Jump to content

طلب كود


3DNAN_!

Recommended Posts

Just now, 3DNAN_! said:

هات الرابط طيب

addEventHandler("onPlayerLogin", root,	
	function(_,account)
		local isFirstTime = getAccountData(account, "isFirstTime") or "no"
		if isFirstTime == "no" then
			givePlayerMoney(source, 1000)
			setAccountData(account, "isFirstTime", "yes")
		end
	end
)

 

  • Like 1
Link to comment
3 hours ago, #x1AhMeD,-09 said:

addEventHandler("onPlayerLogin", root,	
	function(_,account)
		local isFirstTime = getAccountData(account, "isFirstTime") or "no"
		if isFirstTime == "no" then
			givePlayerMoney(source, 1000)
			setAccountData(account, "isFirstTime", "yes")
		end
	end
)

 

false في بق رح يصير معه , لأنه إذا ما كان معه داتا أصلا رح تكون 

"no" وما رح تكون 

Link to comment
On 1/23/2018 at 19:17, #x1AhMeD,-09 said:

addEventHandler("onPlayerLogin", root,	
	function(_,account)
		local isFirstTime = getAccountData(account, "isFirstTime") or "no"
		if isFirstTime == "no" then
			givePlayerMoney(source, 1000)
			setAccountData(account, "isFirstTime", "yes")
		end
	end
)

 

+1

Link to comment
Just now, 3DNAN_! said:

addEventHandler ( 'onClientKey' , root , 

Function ( )

Local place = getElementDimension

If place == 40 then 

كده صح والتكمله ازاي ؟

مش عارف اكمل 

if getElementDimension(localPlayer) ~= 40 then return end

ضيف الكود ذا لكود فتح اللوحه

Or

local key = "" -- زر افتح اللوحه
addEventHandler("onClientKey", root,
  function(button, press) 
    if button == key and press then
      if getElementDimension(localPlayer) ~= 40 then
        	cancelEvent()
        end
     end
   end
 )

 

Edited by #x1AhMeD,-09
Link to comment

تمام عايز كود اخير اللي هو انا عامل مهمه حرب شرطه وعصابة عايز الشرطه متقدرش تقتل في بعضها وكذلك العصابة يعني الشرطة تقتل العصابة والعصابة تقتل الشرطه لاكن عايز اعمل حمايه للفريق الواحد

Link to comment
44 minutes ago, 3DNAN_! said:

تمام عايز كود اخير اللي هو انا عامل مهمه حرب شرطه وعصابة عايز الشرطه متقدرش تقتل في بعضها وكذلك العصابة يعني الشرطة تقتل العصابة والعصابة تقتل الشرطه لاكن عايز اعمل حمايه للفريق الواحد

setTeamFriendlyFire

-- Or
addEventHandler("onClientPlayerDamage")
getPlayerTeam
cancelEvent

 

  • Like 1
Link to comment
On 1/25/2018 at 11:04, 3DNAN_! said:

لا انا بعمل مود لو انت في ديمنشن 40 ميفتحش لوحه الادمن او حرف اف 1 او اف2 او 3 او 4 او 5 او 6 او 7 او 9 او 10

 

او حرف j 

 

 

addEventHandler("onClientKey", root,
	function(button, press) 
		local button = button:lower()
		if (button:find("f") and button ~= "f8" and button ~= "f11" and button ~= "f12") or (button == "j" or button == "p") then
			if getElementDimension(localPlayer) ~= 40 then
				cancelEvent()
			end
		end
	end
)

 

Edited by #SycroX
Link to comment
39 minutes ago, 3DNAN_! said:

طب بس كده لازم اعمل تيمين صح 

 

واحط الكود انه لما يدخل يحط تيم للاعب صح ؟

ما يحتاج تسوي اي تيم

local police = "" -- حط هنا اسم تيم الشرطه حقك
addEventHandler("onClientPlayerDamage", localPlayer,
	function(attacker)
		if attacker and attacker ~= source then
			if ... then -- كود التحقق انو في المهمه
				local attackerTeam = getPlayerTeam(attacker)
				local sourceTeam = getPlayerTeam(source)
				if attackerTeam and sourceTeam and getTeamName(attackerTeam) ~= police and getTeamName(sourceTeam) ~= police then
					cancelEvent()
				end
				if attackerTeam and sourceTeam and attackerTeam == police and sourceTeam == attackerTeam then
					cancelEvent()
				end
			end
		end
	end
)

 

Link to comment
Just now, 3DNAN_! said:

طب ممكن تفهمني الكود 

حط الكود كانك حاطه في مود واشرح جانبه

Quote

 


local police = "" -- حط هنا اسم تيم الشرطه حقك
addEventHandler("onClientPlayerDamage", localPlayer, -- نضيف الحدث
	function(attacker) -- الفانكشن حق الحدث و داخلها تعريف اللاعب المسبب للدامج
		if attacker and attacker ~= source then -- نتحقق ان اللاعب الي سبب الدامج مو هوا نفس اللاعب الي تلقي الدامج
			if ... then -- كود التحقق انو في المهمه
				local attackerTeam = getPlayerTeam(attacker) -- نجيب تيم اللاعب المسبب للدامج
				local sourceTeam = getPlayerTeam(source) -- نجيب تيم اللاعب الي تلقي الدامج
				if attackerTeam and sourceTeam and getTeamName(attackerTeam) ~= police and getTeamName(sourceTeam) ~= police then -- نتحقق ان اللاعبين عندهم تيمات و ان تيم اللاعبين مو الشرطه - يعني انهم حراميه
					cancelEvent() -- نكنسل الحدث
				end -- نهايه التحقق
				if attackerTeam and sourceTeam and attackerTeam == police and sourceTeam == attackerTeam then -- نتاكد ان اللاعبين عندهم تيم و ان تيم المهاجم شرطي و ان اللاعبين الأتنين عندهم نفس التيم
					cancelEvent() -- نكنسل الحدث
				end -- نغلق التحقق
			end -- نغلق تحقق انو في المهمه
		end -- نغلق تحقق ان المهاجم مو هو نفسو الي تلقي الدامج
	end -- نغلق تحقق الفانكشن 
) -- نغلق الأيفنت

 

 

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