Nickelz Posted May 3, 2013 Author Share Posted May 3, 2013 bindKey outputChatBox لآلآلآلآلآلآ , اقصد ابي اذا ضغطت ت يطلع لكك Say : زي اللي اذا ضغطت "ف" يخليك تكتب بالشات Link to comment
iPrestege Posted May 3, 2013 Share Posted May 3, 2013 Events : "onResourceStart" "onPlayerJoin" Functions : table.concat getElementsByType outputChatBox bindKey addCommandHandler Link to comment
Nickelz Posted May 3, 2013 Author Share Posted May 3, 2013 Events : "onResourceStart" "onPlayerJoin" Functions : table.concat getElementsByType outputChatBox bindKey addCommandHandler اذا ممكن تسوي لي مثال Link to comment
فاّرس Posted May 3, 2013 Share Posted May 3, 2013 http://www.gta-arabs.com/gt/showthread.php?t=28440 Link to comment
iPrestege Posted May 3, 2013 Share Posted May 3, 2013 addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function ( ) for index,player in ipairs(getElementsByType("player")) do bindKey( player,"m","down", "chatbox", "CustomChat" ) end end ) addEventHandler("onPlayerJoin", getRootElement(), function ( ) bindKey( source,"m","down", "chatbox", "CustomChat" ) end ) addCommandHandler("CustomChat", function (element, _, ...) local r,g,b = math.random(255),math.random(255),math.random(255) local PlayerName = getPlayerName(element) local message = table.concat(arg, " ") for _,player in ipairs(getElementsByType("player")) do outputChatBox("CustomChat : " .. tostring(PlayerName) .. ": " .. tostring(message), player,r,g,b) end end ) لم يتم التجربة .. سيرفر Link to comment
Blaawee Posted May 3, 2013 Share Posted May 3, 2013 addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function ( ) for index,player in ipairs(getElementsByType("player")) do bindKey( player,"m","down", "chatbox", "CustomChat" ) end end ) addEventHandler("onPlayerJoin", getRootElement(), function ( ) bindKey( source,"m","down", "chatbox", "CustomChat" ) end ) addCommandHandler("CustomChat", function (element, _, ...) local r,g,b = math.random(255),math.random(255),math.random(255) local PlayerName = getPlayerName(element) local message = table.concat(arg, " ") for _,player in ipairs(getElementsByType("player")) do outputChatBox("CustomChat : " .. tostring(PlayerName) .. ": " .. tostring(message), player,r,g,b) end end ) لم يتم التجربة .. سيرفر table.concat(arg, " ") arg ??! addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function ( ) for index,player in ipairs(getElementsByType("player")) do bindKey( player,"m","down", "chatbox", "CustomChat" ) end end ) addEventHandler("onPlayerJoin", getRootElement(), function ( ) bindKey( source,"m","down", "chatbox", "CustomChat" ) end ) addCommandHandler("CustomChat", function (element, _, ...) local r,g,b = math.random(255),math.random(255),math.random(255) local PlayerName = getPlayerName(element) local message = table.concat( { ... }, " " ); for _,player in ipairs(getElementsByType("player")) do outputChatBox("CustomChat : " .. tostring(PlayerName) .. ": " .. tostring(message), player,r,g,b) end end ) Link to comment
3NAD Posted May 4, 2013 Share Posted May 4, 2013 table.concat(arg, " ") arg ??! addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function ( ) for index,player in ipairs(getElementsByType("player")) do bindKey( player,"m","down", "chatbox", "CustomChat" ) end end ) addEventHandler("onPlayerJoin", getRootElement(), function ( ) bindKey( source,"m","down", "chatbox", "CustomChat" ) end ) addCommandHandler("CustomChat", function (element, _, ...) local r,g,b = math.random(255),math.random(255),math.random(255) local PlayerName = getPlayerName(element) local message = table.concat( { ... }, " " ); for _,player in ipairs(getElementsByType("player")) do outputChatBox("CustomChat : " .. tostring(PlayerName) .. ": " .. tostring(message), player,r,g,b) end end ) ماله داعي تجيبهم من الجدول getRootElement ( ) -- كآفي Link to comment
3NAD Posted May 4, 2013 Share Posted May 4, 2013 for _,player in ipairs(getElementsByType("player")) do outputChatBox("CustomChat : " .. tostring(PlayerName) .. ": " .. tostring(message), player,r,g,b) end outputChatBox ( "CustomChat : " ..PlayerName.. ": " ..message, root, r, g, b ) 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