Jump to content

طلب


Recommended Posts

سلام عليكم

الحين مثلا عندي مود يمنع السب

واللي يكتب بالشات كلب

الشات ينمسح

طيب لو احد كتب

كلب وجنبها كلام

يعني مو لحالها

الشات ما ينمسح كيف اخليه ينمسح حتى لو جنبها كلام

Link to comment
  On 27/06/2017 at 19:22, #kAsR said:

string.find

Expand  
klam = {
	["كلب"] = true,
}
addEventHandler("onPlayerChat", root,
	function(msg, msgType)
	local theMsg = msg
		if klam[theMsg] then
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام غير لائق } % --", root,255,0,0,true)
		end
	end
)

بالله مثال على هذا

Link to comment
  On 27/06/2017 at 19:51, #_iMr.[E]coo said:

عدل سطر 7

Expand  

كذا

klam = {
	["كلب"] = true,
}
addEventHandler("onPlayerChat", root,
	function(msg, msgType)
	local theMsg = msg
		if string.find klam[theMsg] then
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام غير لائق } % --", root,255,0,0,true)
		end
	end
)

 

؟؟؟؟؟

#_iMr.[E]coo

Link to comment
klam = {
  "كلب",
  "حيوان",
}

addEventHandler ( 'onPlayerChat' , root ,
function ( aMsg_ ) 
	for i, klam in ipairs(klam) do
		if ( string.find ( aMsg_ , klam ) ) then 
			for i=0,50 do
				outputChatBox("    ")
			end
			outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام غير لائق } % --", root,255,0,0,true)   
		end 
	end 
end
)

 

Link to comment
  On 27/06/2017 at 21:12, Mhmd.z said:
klam = {
  "كلب",
  "حيوان",
}

addEventHandler ( 'onPlayerChat' , root ,
function ( aMsg_ ) 
	for i, klam in ipairs(klam) do
		if ( string.find ( aMsg_ , klam ) ) then 
			for i=0,50 do
				outputChatBox("    ")
			end
			outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام غير لائق } % --", root,255,0,0,true)   
		end 
	end 
end
)

 

Expand  

شوف هذا

addEventHandler("onPlayerChat", root,
	function(msg, msgType, sb)
	local theMsg = msg
	local sb = getPlayerFromName ( sb )
		if sb then
		if string.find(msg, 'كلب') or
		   string.find(msg, 'حيوان') then
		outputChatBox("         ")
		outputChatBox("         ")
		outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام ممنــوع } % --", root,255,0,0,true)
		if ( not isPlayerMuted(sb) ) then
		setPlayerMuted( sb, true )
		outputChatBox("You Has Been Muted", source, 255, 0, 0, true)
		end
	end
end
end
)

يقول فيه مشكلة في 

getPlayerFromName

Link to comment
  On 27/06/2017 at 21:12, Mhmd.z said:

klam = {  "كلب",  "حيوان",}addEventHandler ( 'onPlayerChat' , root ,function ( aMsg_ ) 	for i, klam in ipairs(klam) do		if ( string.find ( aMsg_ , klam ) ) then 			for i=0,50 do				outputChatBox("    ")			end			outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام غير لائق } % --", root,255,0,0,true)   		end 	end end)

 

Expand  

عندك غلط بسطر 3

Link to comment
  On 27/06/2017 at 21:19, A7MEDENO said:

شوف هذا


addEventHandler("onPlayerChat", root,	function(msg, msgType, sb)	local theMsg = msg	local sb = getPlayerFromName ( sb )		if sb then		if string.find(msg, 'كلب') or		   string.find(msg, 'حيوان') then		outputChatBox("         ")		outputChatBox("         ")		outputChatBox("#ff0000{Chat System} #000000-- % { تم مسح الشات / قام لاعب بقول كلام ممنــوع } % --", root,255,0,0,true)		if ( not isPlayerMuted(sb) ) then		setPlayerMuted( sb, true )		outputChatBox("You Has Been Muted", source, 255, 0, 0, true)		end	endendend)

يقول فيه مشكلة في 

getPlayerFromName

Expand  

sb ليش معرف 

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