The moVer Posted April 28, 2015 Share Posted April 28, 2015 السلام عليكم اليوم ابي اعرف كيف اخلي يطلع بالشات كلام لقروب معين مو قروب ادمن قروب من مود لقروبات Link to comment
</Mr.Tn6eL> Posted April 28, 2015 Share Posted April 28, 2015 getElementsByType getElementData outputChatBox Link to comment
yazan Posted April 28, 2015 Share Posted April 28, 2015 function chatbox(text) cancelEvent() local name = getPlayerName(source) if ( getElementData(source, "Group") == "W7H" then outputChatBox("#ffffff* #000000[#ff0000 w7h#000000 ] "..name..":#ffcc00 "..text, root, 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, chatbox) Link to comment
</Mr.Tn6eL> Posted April 28, 2015 Share Posted April 28, 2015 function chatbox(text) cancelEvent() local name = getPlayerName(source) if ( getElementData(source, "Group") == "W7H" then outputChatBox("#ffffff* #000000[#ff0000 w7h#000000 ] "..name..":#ffcc00 "..text, root, 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, chatbox) قال كلام مايشوفونه الا لقروب معين يبي يسوي شات للقروب Link to comment
The moVer Posted April 29, 2015 Author Share Posted April 29, 2015 شكرا شباب ما قصرتو Link to comment
yazan Posted April 29, 2015 Share Posted April 29, 2015 local GroupName = "w7h" local key = "r" addCommandHandler("GroupChat", function (player, _, ...) local msg = table.concat({...}, " ") local pName = getPlayerName(player) for i,x in ipairs (getElementsByType("player")) do if getElementData(x, "Group") == GroupName then outputChatBox("("..teamName..") "..pName..": #FFFFFF"..msg, x, r, g, b, true) else if isKeyBound(x, key, "down", nothing) then unbindKey(x, key, "down", "chatbox", "GroupChat") unbindKey(x, key, "down", nothing) end end end end) addEventHandler("onResourceStart", resourceRoot, function() for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "Group") == GroupName then bindKey(player, key, "down", "chatbox", "GroupChat") bindKey(player, key, "down", nothing) end end end) setTimer( function() for k,v in ipairs(getElementsByType("player")) do if getElementData(v, "Group") == GroupName then if not isKeyBound(x, key, "down", nothing) then bindKey(v, key, "down", "chatbox", "GroupChat") bindKey(v, key, "down", nothing) end else if isKeyBound(v, key, "down", nothing) then unbindKey(v, key, "down", "chatbox", "GroupChat") unbindKey(v, key, "down", nothing) end end end end,100,0) هذه الكود حق تابل عدلت عليه كان لتيم تقدر تحط زر و اسم القروب من فوق اول سطرين + ما احد يقدر يشوف شات غير العندهم القروب Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now