Jump to content

مساعده


Recommended Posts

4 minutes ago, #Soking said:

if ( isPlayerMuted ( source ) ) then return end

 

ما اشتغل


function isPlayerInRangeOfPoint ( player, x, y, z, range )
   local px, py, pz = getElementPosition ( player )
   return ( ( x- px ) ^2+ ( y- py ) ^2+ ( z- pz ) ^2 ) ^0.5 <= range
end

RGBToHex = function (red, green, blue, alpha)
	if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
		return nil
	end
	if(alpha) then
		return string.format ( "#%.2X%.2X%.2X%.2X", red, green, blue, alpha )
	else
		return string.format ( "#%.2X%.2X%.2X", red, green, blue )
	end
end

LocalChat = function ( player, command, ... )
	if ChatLocalDisabled then
		local acc = getPlayerAccount(player)
		if not isGuestAccount ( acc ) then
			if not isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then 
				outputChatBox ( "(LOCAL) * Locked", player, 255, 255, 0, true )
				cancelEvent ( ) 
				return 
			end
		else
			outputChatBox ( "(LOCAL) * Locked.", player, 255, 255, 0, true )
			cancelEvent()
			return
		end
	end
	local px, py, pz = getElementPosition ( player )
	local msg = table.concat ( {...}, " " )
	for i, v in ipairs ( getElementsByType ( "player" ) ) do
		if isPlayerInRangeOfPoint ( v, px, py, pz, 30 ) then
      if ( isPlayerMuted ( source ) ) then return end
			local plrTeam = getPlayerTeam(player)
			if plrTeam then
				local rr, gg, bb = getTeamColor(plrTeam)			
				outputChatBox ( RGBToHex(rr, gg, bb).."(LOCAL) "..getPlayerName(player)..": #FFFFFF"..msg, v, 255, 255, 0, true )
			else
				outputChatBox ( "(LOCAL) "..getPlayerName(player)..": #FFFFFF"..msg, v, 255, 255, 0, true )
			end
		end
	end
	outputServerLog("LOCAL: ".. getPlayerName ( player ) .. ": " .. msg)
end
addCommandHandler ( "Local", LocalChat )


		

 

Edited by A7MEDENO
Link to comment
12 minutes ago, #Soking said:

وين حاطط التحقق مو محصله

 



function isPlayerInRangeOfPoint ( player, x, y, z, range )
   local px, py, pz = getElementPosition ( player )
   return ( ( x- px ) ^2+ ( y- py ) ^2+ ( z- pz ) ^2 ) ^0.5 <= range
end

RGBToHex = function (red, green, blue, alpha)
	if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
		return nil
	end
	if(alpha) then
		return string.format ( "#%.2X%.2X%.2X%.2X", red, green, blue, alpha )
	else
		return string.format ( "#%.2X%.2X%.2X", red, green, blue )
	end
end

LocalChat = function ( player, command, ... )
	if ChatLocalDisabled then
		local acc = getPlayerAccount(player)
		if not isGuestAccount ( acc ) then
			if not isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then 
				outputChatBox ( "(LOCAL) * Locked", player, 255, 255, 0, true )
				cancelEvent ( ) 
				return 
			end
		else
			outputChatBox ( "(LOCAL) * Locked.", player, 255, 255, 0, true )
			cancelEvent()
			return
		end
	end
	local px, py, pz = getElementPosition ( player )
	local msg = table.concat ( {...}, " " )
	for i, v in ipairs ( getElementsByType ( "player" ) ) do
		if isPlayerInRangeOfPoint ( v, px, py, pz, 30 ) then
		if ( isPlayerMuted ( source ) ) then return end ------------- التحقق 
			local plrTeam = getPlayerTeam(player)
			if plrTeam then
				local rr, gg, bb = getTeamColor(plrTeam)			
				outputChatBox ( RGBToHex(rr, gg, bb).."(LOCAL) "..getPlayerName(player)..": #FFFFFF"..msg, v, 255, 255, 0, true )
			else
				outputChatBox ( "(LOCAL) "..getPlayerName(player)..": #FFFFFF"..msg, v, 255, 255, 0, true )
			end
		end
	end
	outputServerLog("LOCAL: ".. getPlayerName ( player ) .. ": " .. msg)
end
addCommandHandler ( "Local", LocalChat )


		

سطر 38

Edited by A7MEDENO
Link to comment
1 minute ago, #BrosS said:

Image associée

هههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه

شكرا لكم

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