Jump to content

مشكله outputChatBox يتكرر


iiv03

Recommended Posts

هلا السلام عليكم ورحمة الله وبركاته

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

--سرفر
addEvent ("addText",true)
addEventHandler ("addText",root,
function (playerSource,element)
outputChatBox("| #ff0000INFO:#ffffff "..getPlayerName(playerSource).."#ffffff has reached #ff0000MAP LIMIT!", getRootElement(), 255,255,255,true)
end)
--كلينت
function back()
if source == zone then
removeEventHandler("onClientRender", root,zoneText)
end
end

function leave(element)
if source == zone then
addEventHandler("onClientRender", root,zoneText)
triggerServerEvent ("addText",localPlayer,element) 
end
end

addEventHandler ("onClientColShapeLeave",root,leave)
addEventHandler ("onClientColShapeHit",root,back)

 

Link to comment
    --كلينت
    function back()
    if source == zone then
    removeEventHandler("onClientRender", root,zoneText)
    end
    end

    function leave(element)
    if source == zone then
    addEventHandler("onClientRender", root,zoneText)
    if element == localPlayer then triggerServerEvent ("addText",localPlayer,element) end
    end
    end

    addEventHandler ("onClientColShapeLeave",root,leave)
    addEventHandler ("onClientColShapeHit",root,back)

 

  • Thanks 1
Link to comment
2 hours ago, TAPL said:

    --كلينت
    function back()
    if source == zone then
    removeEventHandler("onClientRender", root,zoneText)
    end
    end

    function leave(element)
    if source == zone then
    addEventHandler("onClientRender", root,zoneText)
    if element == localPlayer then triggerServerEvent ("addText",localPlayer,element) end
    end
    end

    addEventHandler ("onClientColShapeLeave",root,leave)
    addEventHandler ("onClientColShapeHit",root,back)

 

thanks tabl .^ :)

 

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