Jump to content

طلب


Recommended Posts

سلام عليكم

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

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

الشات ينمسح

طيب لو احد كتب

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

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

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

Link to comment
14 minutes ago, #kAsR said:

string.find

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
11 minutes ago, #_iMr.[E]coo said:

عدل سطر 7

كذا

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
14 minutes ago, #_iMr.[E]coo said:

نو

مقدر اسويها للجدول كامل

klam = {
  ["Money"] = true,
  ["فلوس"] = true,
}

addEventHandler ( 'onPlayerChat' , root ,
  function ( aMsg_ ) 
    if ( string.find ( aMsg_ , klam ) ) then 
      givePlayerMoney ( source , 1 )
    end 
  end 
)

 

Edited by A7MEDENO
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
5 minutes ago, 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
)

 

شوف هذا

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
8 hours ago, 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)

 

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

Link to comment
11 hours ago, 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

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