Jump to content

فكشنات


Recommended Posts

كذا؟

addEventHandler("onClientGUIClick",resourceRoot, 
    function() 
    if  source == GUIEditor.button[1]  then 
    setElementData (localPlayer,'LockChat') 
    elseif source == GUIEditor.button[2] then 
    setElementData (localPlayer,'LockChat') 
    end 
    end) 
  
 SERVER # 
addEventHandler("onPlayerChat",resourceRoot, 
    function() 
    if type == 0 
    setElementData (localPlayer,'LockChat','true') 
    cancelEvent() 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then 
end 
    end 
) 
     

Link to comment
كذا؟
addEventHandler("onClientGUIClick",resourceRoot, 
    function() 
    if  source == GUIEditor.button[1]  then 
    setElementData (localPlayer,'LockChat') 
    elseif source == GUIEditor.button[2] then 
    setElementData (localPlayer,'LockChat') 
    end 
    end) 
  
 SERVER # 
addEventHandler("onPlayerChat",resourceRoot, 
    function() 
    if type == 0 
    setElementData (localPlayer,'LockChat','true') 
    cancelEvent() 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then 
end 
    end 
) 
     

--#Client Side 
addEventHandler("onClientGUIClick", root, 
function() 
if source == GUIEditor.button[1] then 
triggerServerEvent("Chat", localPlayer, "Open") 
elseif source == GUIEditor.button[2] then 
triggerServerEvent("Chat", localPlayer, "Close") 
end 
end) 
  

--#Server Side 
addEvent("Chat", true) 
addEventHandler("Chat", root, 
function(Event) 
if Event == "Open" then 
for index, value in ipairs(getElementsByType("player")) do 
setElementData(value, "ChatStat", "Lock") 
end 
elseif Event == "Close" then 
for index, value in ipairs(getElementsByType("player")) do 
setElementData(value, "ChatStat", "Open") 
end 
end 
end) 
  
addEventHandler("onPlayerChat", root, 
function() 
if getElementData(source, "ChatStat") == "Lock" then 
cancelEvent() 
outputChatBox("Chat is Locked!!", source, 255, 0, 0, true) 
else 
end 
end 
) 
  
  
  
Link to comment
طيب لو ابي اعمل

اليتكلم فقط الكونسل لما الشات يتقفل

addEventHandler("onPlayerChat", root, 
function() 
local acc = getAccountName(getPlayerAccount(source)) 
if getElementData(source, "ChatStat") == "Lock" then 
if not isObjectInACLGroup ( "user."..acc, aclGetGroup("Console")) then 
cancelEvent() 
else 
setElementData(source, "ChatStat", "Open") 
end 
else 
end 
end) 
  
Link to comment

بقولك اسف الي فوق غلط اتفضل جربتو عندي

--#Client 
addEventHandler("onClientGUIClick", root, 
function() 
if source == GUIEditor.button[1] then 
triggerServerEvent("ChatOpen", localPlayer) 
elseif source == GUIEditor.button[2] then 
triggerServerEvent("ChatLock", localPlayer) 
end 
end) 
----#Server 
addEvent("ChatOpen", true) 
addEventHandler("ChatOpen", root, 
function() 
for index, value in ipairs(getElementsByType("player")) do 
setElementData(value, "ChatStat", "Open") 
end 
end) 
  
addEvent("ChatLock", true) 
addEventHandler("ChatLock", root, 
function() 
for index, value in ipairs(getElementsByType("player")) do 
setElementData(value, "ChatStat", "Lock") 
end 
end) 
  
addEventHandler("onPlayerChat", root, 
function() 
local acc = getAccountName(getPlayerAccount(source)) 
if getElementData(source, "ChatStat") == "Lock" then 
if not isObjectInACLGroup ( "user."..acc, aclGetGroup("Co1nsole")) then 
cancelEvent() 
outputChatBox("chat lock", source, 255, 0, 0, true) 
else 
end 
else 
end 
end) 
  
  
Link to comment
بقولك اسف الي فوق غلط اتفضل جربتو عندي

--#Client 
addEventHandler("onClientGUIClick", root, 
function() 
if source == GUIEditor.button[1] then 
triggerServerEvent("ChatOpen", localPlayer) 
elseif source == GUIEditor.button[2] then 
triggerServerEvent("ChatLock", localPlayer) 
end 
end) 
----#Server 
addEvent("ChatOpen", true) 
addEventHandler("ChatOpen", root, 
function() 
for index, value in ipairs(getElementsByType("player")) do 
setElementData(value, "ChatStat", "Open") 
end 
end) 
  
addEvent("ChatLock", true) 
addEventHandler("ChatLock", root, 
function() 
for index, value in ipairs(getElementsByType("player")) do 
setElementData(value, "ChatStat", "Lock") 
end 
end) 
  
addEventHandler("onPlayerChat", root, 
function() 
local acc = getAccountName(getPlayerAccount(source)) 
if getElementData(source, "ChatStat") == "Lock" then 
if not isObjectInACLGroup ( "user."..acc, aclGetGroup("Co1nsole")) then 
cancelEvent() 
outputChatBox("chat lock", source, 255, 0, 0, true) 
else 
end 
else 
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...