Jump to content

[مساعدة بسيطة]


Doffy

Recommended Posts

ابي اول ما يدخل في سيف زون او كول شيب يجيله الدي اكس هذا علي جنب واول ما يطلع منه يختفي الدي اكس
كلنت سايد
 

addEventHandler("onClientRender",root,
function()
Rectangle = dxDrawRectangle(824, 393, 107, 40, tocolor(0, 0, 0, 90), false)
Text = dxDrawText("Safe Zone", 844, 402, 910, 423, tocolor(0, 255, 0, 255), 1.00, "sans", "left", "top", false, false, false, false, false)
end)

addEvent("photo", true)
addEventHandler("photo",root,
function()
guiSetVisible(Rectangle, true)
guiSetVisible(Text, true)
end)

addEvent("unphoto", true)
addEventHandler("unphoto",root,
function()
guiSetVisible(Rectangle, false)
guiSetVisible(Text, false)
end)

سيرفر سايد
 

c = createColCuboid (2916.02490,-2101.63184,1,370,230,255)  
s = createRadarArea (2916.02490,-2101.63184,370,230,0,255,0, 100)
setElementData (s,"zombieProof",true)
addEventHandler ("onColShapeHit",c,
function (s)
if getElementType (s) == "ped" and getElementData(s,"zombie") then
killPed(s)
elseif getElementType (s) == "player" then
toggleControl (s,"fire",false)
outputChatBox("انت الان داخل الحماية من الزومبي", s, 0, 255, 0)
triggerClientEvent ("photo",localPlayer)
end
end)

addEventHandler ("onColShapeLeave",c,
function (s)
if getElementType (s) == "ped" and getElementData(s,"zombie") then
killPed(s)
elseif getElementType (s) == "player" then
toggleControl(s,"fire",true)
triggerClientEvent ("unphoto",localPlayer)
outputChatBox("انت الان خارج الحماية يمكنك قتل الزومبي", s, 255, 0, 0)
end
end)


 

Link to comment

مالي كثير بالدي اكس

جرب 


addEventHandler("onColShapeHit",colshape, 
    function ( HitElement ) 
        if getElementType ( HitElement ) == "player" then 
        toggleControl (HitElement,"fire",false)
        outputChatBox("انت الان داخل الحماية من الزومبي", s, 0, 255, 0)
        addEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
addEventHandler("onColShapeLeave",colshape, 
    function ( HitElement ) 
            if getElementType ( HitElement ) == "player" then 
			toggleControl(s,"fire",true)
            removeEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
function CreateDx( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        return x, y 
end 
  
 function Dx( ) 
        local x,y = CreateDx( x,y ) --  هنا احداثيات 
        dxDrawText("انت في المنطقة المحمية",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) 
    end 
  

 

Link to comment
Just now, #_iMr,[E]coo said:

مالي كثير بالدي اكس

جرب 


addEventHandler("onColShapeHit",colshape, 
    function ( HitElement ) 
        if getElementType ( HitElement ) == "player" then 
        toggleControl (HitElement,"fire",false)
        outputChatBox("انت الان داخل الحماية من الزومبي", s, 0, 255, 0)
        addEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
addEventHandler("onColShapeLeave",colshape, 
    function ( HitElement ) 
            if getElementType ( HitElement ) == "player" then 
			toggleControl(s,"fire",true)
            removeEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
function CreateDx( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        return x, y 
end 
  
 function Dx( ) 
        local x,y = CreateDx( x,y ) --  هنا احداثيات 
        dxDrawText("انت في المنطقة المحمية",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) 
    end 
  

 

يخوي ما بدي كذا انا مسوي في الكلنت سايد بس ابيها اول ما ادخل في الحماية تشتغل واول ما اروح من الحماية تختفي فهمتني ؟

Link to comment
Just now, #_iMr,[E]coo said:

وطيب والي سويته لك ايش ؟

مهمة ركض ؟

ششش

 

يلبيه شوف انا وش مسوي ابيك تسوي الدي اكس الي انا مسويه -_- لانو الي انت مسويه غلط -_- 

Link to comment

Client

 

function dxPanel()
	dxDrawRectangle(824, 393, 107, 40, tocolor(0, 0, 0, 90), false)
	dxDrawText("Safe Zone", 844, 402, 910, 423, tocolor(0, 255, 0, 255), 1.00, "sans", "left", "top", false, false, false, false, false)
end	

addEvent("photo", true)
addEventHandler("photo",root,
	function ( st )
		if st == "draw" then
			addEventHandler("onClientRender",root,dxPanel)
		elseif st == "undraw" then
			removeEventHandler("onClientRender",root,dxPanel)
		end
	end
)

 

Server

 

c = createColCuboid (2916.02490,-2101.63184,1,370,230,255)  
s = createRadarArea (2916.02490,-2101.63184,370,230,0,255,0, 100)
setElementData (s,"zombieProof",true)

addEventHandler ("onColShapeHit",c,
	function ( s )
		if getElementType (s) == "ped" and getElementData(s,"zombie") then
			killPed(s)
		elseif getElementType (s) == "player" then
			toggleControl (s,"fire",false)
			outputChatBox("انت الان داخل الحماية من الزومبي", s, 0, 255, 0)
			triggerClientEvent (s,"photo",s,"draw")
		end
	end
)

addEventHandler ("onColShapeLeave",c,
	function (s)
		if getElementType (s) == "ped" and getElementData(s,"zombie") then
			killPed(s)
		elseif getElementType (s) == "player" then
			toggleControl(s,"fire",true)
			triggerClientEvent (s,"photo",s,"undraw")
			outputChatBox("انت الان خارج الحماية يمكنك قتل الزومبي", s, 255, 0, 0)
		end
	end
)

 

Link to comment
3 minutes ago, N3xT said:

Client

 


function dxPanel()
	dxDrawRectangle(824, 393, 107, 40, tocolor(0, 0, 0, 90), false)
	dxDrawText("Safe Zone", 844, 402, 910, 423, tocolor(0, 255, 0, 255), 1.00, "sans", "left", "top", false, false, false, false, false)
end	

addEvent("photo", true)
addEventHandler("photo",root,
	function ( st )
		if st == "draw" then
			addEventHandler("onClientRender",root,dxPanel)
		elseif st == "undraw" then
			removeEventHandler("onClientRender",root,dxPanel)
		end
	end
)

 

Server

 


c = createColCuboid (2916.02490,-2101.63184,1,370,230,255)  
s = createRadarArea (2916.02490,-2101.63184,370,230,0,255,0, 100)
setElementData (s,"zombieProof",true)

addEventHandler ("onColShapeHit",c,
	function ( s )
		if getElementType (s) == "ped" and getElementData(s,"zombie") then
			killPed(s)
		elseif getElementType (s) == "player" then
			toggleControl (s,"fire",false)
			outputChatBox("انت الان داخل الحماية من الزومبي", s, 0, 255, 0)
			triggerClientEvent (s,"photo",s,"draw")
		end
	end
)

addEventHandler ("onColShapeLeave",c,
	function (s)
		if getElementType (s) == "ped" and getElementData(s,"zombie") then
			killPed(s)
		elseif getElementType (s) == "player" then
			toggleControl(s,"fire",true)
			triggerClientEvent (s,"photo",s,"undraw")
			outputChatBox("انت الان خارج الحماية يمكنك قتل الزومبي", s, 255, 0, 0)
		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...