xXMADEXx Posted July 31, 2013 Share Posted July 31, 2013 (edited) Information & Fetures: Hi guys! Today i've made a top bar chat for the MTA community. Please let me know what you think of this script, and rate it 5/5 on MTA community website! Community Link The last message sent will have the darkest alpha, and every message lasts for 8 seconds. The maximum messages that it will show at a time is 5, and the lasting time + max messages are very easy to change. (can only be changed in the uncompiled code.) Author: xXMADEXx Version 1.4: Changelog: - Added messages fade in/out - Replaced timers with getTickCount ( ) - Made it so the same messages can be showed more than once Syntax (server) bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. thePlayer: The player that the message will be sent to (use root for all) [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Syntax (client) bool sendClientMessage ( string message [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Examples: -- Example 1: addEventHandler ( "onPlayerQuit", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has left the server.", root, 255, 100, 100, true, 8 ) end ) -- Example 2: addEventHandler ( "onPlayerJoin", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has connected to the server!", root, 255, 100, 100, false, 10 ) end ) Version 1.3: Changelog: - Added HEX color code support - Added a optional time argument Syntax (server) bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. thePlayer: The player that the message will be sent to (use root for all) [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Syntax (client) bool sendClientMessage ( string message [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Examples: -- Example 1: addEventHandler ( "onPlayerQuit", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has left the server.", root, 255, 100, 100, true, 8 ) end ) -- Example 2: addEventHandler ( "onPlayerJoin", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has connected to the server!", root, 255, 100, 100, false, 10 ) end ) Version 1.1 - Version 1.2: Changelog: (1.1) - Fixed an error with the max messages (was always one more then defined) - Added the bottom bar - Added an argument to select what bar to output to (1.2) - Fixed a bug with the bar message operations (didn't output to the correct positions) Syntax (server) bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255, bool topBar=true ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. thePlayer: The player that the message will be sent to (use root for all) [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar Syntax (client) bool sendClientMessage ( string message [, int r=255, int g=255, int b=255, bool topBar=true ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar Examples: -- Example 1: addEventHandler ( "onPlayerQuit", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has left the server.", root, 255, 100, 100, true ) end ) -- Example 2: addEventHandler ( "onPlayerJoin", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has connected to the server!", root, 255, 100, 100, false ) end ) Version 1.0: Syntax (server) bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. thePlayer: The player that the message will be sent to (use root for all) [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) Syntax (client) bool sendClientMessage ( string message [, int r=255, int g=255, int b=255 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) Examples: -- Example 1: addEventHandler ( "onPlayerQuit", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has left the server.", root, 255, 100, 100 ) end ) -- Example 2: addEventHandler ( "onPlayerJoin", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has connected to the server!", root, 255, 100, 100 ) end ) Edited July 12, 2014 by Guest Link to comment
WASSIm. Posted July 31, 2013 Share Posted July 31, 2013 this board for scripting post here: viewforum.php?f=108 Link to comment
xXMADEXx Posted July 31, 2013 Author Share Posted July 31, 2013 Woops O_O I ment to post in Resources section.. Admin please move to resources. Link to comment
gokalpfirat Posted July 31, 2013 Share Posted July 31, 2013 Really nice script but I want to move it to bottom like debugscript. Because I got race timers in there. Can I change cordinates with your permission? Link to comment
xXMADEXx Posted July 31, 2013 Author Share Posted July 31, 2013 Really nice script but I want to move it to bottom like debugscript. Because I got race timers in there. Can I change cordinates with your permission? Yea, you have my permission, no prob (If you want help i can help you.) Do whatever else you want to it too, just please don't remove my credits. Link to comment
gokalpfirat Posted July 31, 2013 Share Posted July 31, 2013 Really nice script but I want to move it to bottom like debugscript. Because I got race timers in there. Can I change cordinates with your permission? Yea, you have my permission, no prob (If you want help i can help you.) Do whatever else you want to it too, just please don't remove my credits. If you make the one with bottom too it would be good Or new argument for making message at bottom Link to comment
Chaz-CR Posted July 31, 2013 Share Posted July 31, 2013 Good Job man. This will be very helpful to clean the chat! Link to comment
xXMADEXx Posted July 31, 2013 Author Share Posted July 31, 2013 (edited) Thank you Really nice script but I want to move it to bottom like debugscript. Because I got race timers in there. Can I change cordinates with your permission? Yea, you have my permission, no prob (If you want help i can help you.) Do whatever else you want to it too, just please don't remove my credits. If you make the one with bottom too it would be good Or new argument for making message at bottom I might be able to make a new argument to make it come out on the bottom... Ill try it Edit: This has been added. Edited August 1, 2013 by Guest Link to comment
Sora Posted July 31, 2013 Share Posted July 31, 2013 Well done mate , this is really awesome script keep going Link to comment
xXMADEXx Posted August 1, 2013 Author Share Posted August 1, 2013 Well done mate , this is really awesome script keep going Thank you! New Version Released: v1.1 Whats added? - Fixed a bug with the max messages - Added a new bottom bar, with a new argument "topBar." New format code: Client: bool sendClientMessage ( string text [, int r=0, int g=0, int b=0, bool topBar=true ] ) [b]Required Arguments[/b] Text - the text that will be outputed into the bar [b]Optional Arguments[/b] r - The amount of red you want in the mixture of RGB (0-255 is valid) g - The amount of green you want in the mixture of RGB (0-255 is valid) b - The amount of blue you want in the mixture of RGB (0-255 is valid) topBar - If true then the message will be sent to the top bar, if false the it will be sent to the bottom bar Server: bool sendClientMessage ( string text, player thePlayer [, int r=0, int g=0, int b=0, bool topBar=true ] ) [b]Required Arguments[/b] Text - the text that will be outputed into the bar thePlayer - The player the message will be sent to (use root for all) [b]Optional Arguments[/b] r - The amount of red you want in the mixture of RGB (0-255 is valid) g - The amount of green you want in the mixture of RGB (0-255 is valid) b - The amount of blue you want in the mixture of RGB (0-255 is valid) topBar - If true then the message will be sent to the top bar, if false the it will be sent to the bottom bar Link to comment
Halfmillz Posted August 1, 2013 Share Posted August 1, 2013 is this support color code? it's will great if can use color code like outputchatbox Link to comment
xXMADEXx Posted August 1, 2013 Author Share Posted August 1, 2013 is this support color code? it's will great if can use color code like outputchatbox It only supports RGB at the moment. Next update ill make it support HEX. Link to comment
gokalpfirat Posted August 1, 2013 Share Posted August 1, 2013 It's really nice script and with new bottom support It becomes awesome. Link to comment
gokalpfirat Posted August 1, 2013 Share Posted August 1, 2013 Sorry for flood. There are 2 things you should done in new version. Firstly adding hex support. Secondly there should be argument for dissappering time. Link to comment
xXMADEXx Posted August 1, 2013 Author Share Posted August 1, 2013 Sorry for flood.There are 2 things you should done in new version. Firstly adding hex support. Secondly there should be argument for dissappering time. Will be added in v1.3. Link to comment
xXMADEXx Posted August 1, 2013 Author Share Posted August 1, 2013 Version 1.3: Changelog: - Added HEX color code support - Added a optional time argument Syntax (server) bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. thePlayer: The player that the message will be sent to (use root for all) [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Syntax (client) bool sendClientMessage ( string message [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Examples: -- Example 1: addEventHandler ( "onPlayerQuit", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has left the server.", root, 255, 100, 100, true, 8 ) end ) -- Example 2: addEventHandler ( "onPlayerJoin", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has connected to the server!", root, 255, 100, 100, false, 10 ) end ) I am still taking suggestions. Next version (if there is one) will be the last, unless a bug is found. Link to comment
EstrategiaGTA Posted August 2, 2013 Share Posted August 2, 2013 Version 1.3:Changelog: - Added HEX color code support - Added a optional time argument Syntax (server) bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. thePlayer: The player that the message will be sent to (use root for all) [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Syntax (client) bool sendClientMessage ( string message [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) [b]Required Arguments[/b] message: The text that will be applied to the bar. [b]Optional Arguments[/b] r: The amount of red you want in the mixture of RGB (0-255 is valid) g: The amount of greeen you want in the mixture of RGB (0-255 is valid) b: The amount of blue you want in the mixture of RGB (0-255 is valid) topBar: If set to true, then the message will send to the top bar, otherwise to the bottom bar time: The time the message will stay on the screen [b](unless the number of messages hits the maximum) (in seconds)[/b] Examples: -- Example 1: addEventHandler ( "onPlayerQuit", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has left the server.", root, 255, 100, 100, true, 8 ) end ) -- Example 2: addEventHandler ( "onPlayerJoin", root, function ( ) exports["TopBarChat"]:sendClientMessage ( getPlayerName ( source ).." has connected to the server!", root, 255, 100, 100, false, 10 ) end ) I am still taking suggestions. Next version (if there is one) will be the last, unless a bug is found. Very nice! Link to comment
gokalpfirat Posted August 2, 2013 Share Posted August 2, 2013 Now nothing to add is needed Maybe you can make animations for rectangles. Note: I dont know if its bug but you cant send the same message more than 1 time. Link to comment
xXMADEXx Posted August 2, 2013 Author Share Posted August 2, 2013 Now nothing to add is needed Maybe you can make animations for rectangles.Note: I dont know if its bug but you cant send the same message more than 1 time. Eh animations are to difficult to do... And thats not a bug. It won't show the same message twice. I did it to prevent a bug that would have occurred. Very nice! Thanks Link to comment
HerobrunoES=D Posted August 6, 2013 Share Posted August 6, 2013 Excuse me, Sir but I can't Download it when i press Download Button it only refreshs the Page can you help me o,o? Link to comment
xXMADEXx Posted August 7, 2013 Author Share Posted August 7, 2013 Excuse me, Sir but I can't Download it when i press Download Button it only refreshs the Page can you help me o,o? Sorry about that. I have fixed the download button, try it now http://ros.scgmta.net/pages/scripts/vie ... TopBarChat 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