Jump to content

خطأ في كود


Private

Recommended Posts

السلام عليكم شباب انا عدلت ذا الكود اذا دخل ماركر يتقفل الشات واذا طلع من الماركر ينفتح الشات

local marker = createMarker(1,1,4,"cylinder",1.5,0,255,0,255) 
  
addEventHandler("onMarkerHit",root, 
function (mz) 
    setElementData(getResourceRootElement(getThisResource()),"ChatSystem",tostring(s)) 
    if s == "False" then 
        outputChatBox("تم اغلاق الشات "..getPlayerName(p).."",root,0,255,0) 

    end 
end)

  
 

Link to comment
marker = createMarker(1,1,4,"cylinder",1.5,0,255,0,255) 

addEventHandler ( "onMarkerHit" , root , function ( Hit )
if ( source == marker and getElementType ( Hit ) == "player" ) then 
setElementData ( resourceRoot , "ChatLocked" , true )
outputChatBox ( "تم اغلاق الشات" , Hit )
end
end )

addEventHandler ( "onMarkerLeave" , root , function ( Hit )
if ( source == marker and getElementType ( Hit ) == "player" ) then 
setElementData ( resourceRoot , "ChatLocked" , false )
outputChatBox ( "تم فتح الشات" , Hit )
end
end )

 

  • Like 1
Link to comment

local marker = createMarker(1,1,4,"cylinder",1.5,0,255,0,255) 
  
addEventHandler("onMarkerHit",root, 
function (mz) 
	if ( getElementType(mz) == 'player' ) then
		local s = getElementData(getResourceRootElement(getThisResource()),"ChatSystem") 
		if s == "False" then 
			outputChatBox("تم اغلاق الشات "..getPlayerName(p).."",mz,0,255,0,true) 
		end 
    end 
end)

اذا ماضبط فـ الخطأ من عندك يمكن الداتا غير صحيحه ..#

Link to comment
local marker = createMarker(1,1,4,"cylinder",1.5,0,255,0,255) 
  
addEventHandler("onMarkerHit",root, 
function (mz) 
	if ( getElementType(mz) == 'player' ) then
		local s = getElementData(getResourceRootElement(getThisResource()),"ChatSystem") 
		if ( s ) then
			if s == "False" then 
				outputChatBox("تم اغلاق الشات "..getPlayerName(mz).."",mz,0,255,0,true) 
				return
			end 
			outputChatBox("* there's a data but not Fasle",root,0,255,0,true) 
		else
			outputChatBox("* No Data",root,0,255,0,true) 
		end 
    end 
end)

 

جرب وقولي وش يطلعلك بالشات .

@Default تسلم ع التنبيه

  • Like 1
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...