gudenmike Posted July 7, 2010 Share Posted July 7, 2010 hey guys ive tried making an radio like if you write "/r help im pinned down at los santos airport" it will go out to everyone just like an basic chat script but i suck at scripting to be honest anyone here who can help or maybe make the script for me (i guess its simple) Link to comment
TheRealCow Posted July 7, 2010 Share Posted July 7, 2010 function bla ( ) outputChatBox ("help im pinned down at los santos airport", getRootElement(), 0,255,0 ) end addCommandHandler ("r", bla ) something like that?? Link to comment
50p Posted July 7, 2010 Share Posted July 7, 2010 Maybe this will help you: https://forum.multitheftauto.com/viewtop ... 91&t=28285 Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 thanks guys ! ill try yours therealcow first Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 ohh no wait cow i needed an script that will make you able to type anything by using /r im going to use in on my zombie rp server so you can contact the army using /r not only the army but so all people can se it Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 well ill just try to explain better i want people to write /r "there text" so it comes out in the chat box as RADIO:(text) Link to comment
Castillo Posted July 7, 2010 Share Posted July 7, 2010 well ill just try to explain betteri want people to write /r "there text" so it comes out in the chat box as RADIO:(text) this is what u want i think function radioChat( player, cmd, ... ) local message = table.concat({...}," ") outputChatBox ("*RADIO: "..message) end addCommandHandler("r",radioChat) i dint put the player who types, should i put? Link to comment
50p Posted July 7, 2010 Share Posted July 7, 2010 Another one who seems to ignore looking at my links. Or why don't you just use wiki which gives you all the answers? Link to comment
Castillo Posted July 7, 2010 Share Posted July 7, 2010 Another one who seems to ignore looking at my links. Or why don't you just use wiki which gives you all the answers? yeah, i was wondering why he dint used yours. Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 50p i did use your link but i didnt get it to work since that were an "call" system based on teams and such so sorry if you got something wrong haha thx solid ohh and i tried the wiki but i didnt find anything but i tried and thats what counts isnt it ? im happy that your guys are here im learning the things im asking for btw no you shoulnt solid thx Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 ohh 1 last question how can i give the radio text colour ? Link to comment
Castillo Posted July 7, 2010 Share Posted July 7, 2010 ohh 1 last question how can i give the radio text colour ? dont know i tryed many things like EX colors and nothing works. Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 hm.. 50p got any idea ? just gonna search the wiki Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 ive got it working mate Heres the code for public use ! function radioChat( player, cmd, ... ) local message = table.concat({...}," ") outputChatBox ("*RADIO: "..message, getRootElement(), 255, 75, 0) end addCommandHandler("r",radioChat) Link to comment
Castillo Posted July 7, 2010 Share Posted July 7, 2010 ive got it working mate Heres the code for public use ! function radioChat( player, cmd, ... ) local message = table.concat({...}," ") outputChatBox ("*RADIO: "..message, getRootElement(), 255, 75, 0) end addCommandHandler("r",radioChat) ahhhhhhhhhhhhhhhhhh i forgot about that "getRootElement()" Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 you see guys !? i am using wiki Link to comment
50p Posted July 8, 2010 Share Posted July 8, 2010 you see guys !?i am using wiki I always recommend you use it on everyday basis. Link to comment
gudenmike Posted July 8, 2010 Author Share Posted July 8, 2010 hehe 50p i've just began learning to scripting so ive just needed some help hope you understand but i do use the wiki i just didnt knew how to use the outputchatbox so when players use /r they can write their own text i know how to make them use /r but then i dont know how to make them type whatever they want Link to comment
50p Posted July 8, 2010 Share Posted July 8, 2010 hehe 50p i've just began learning to scripting so ive just needed some help hope you understand but i do use the wiki i just didnt knew how to use the outputchatbox so when players use /r they can write their own text i know how to make them use /r but then i dont know how to make them type whatever they want You would know if you read example codes that are on almost every function/event wiki page. Link to comment
gudenmike Posted July 8, 2010 Author Share Posted July 8, 2010 50p i did read but i didnt find anything allright or else i wouldnt ask here.. end of discution (lol spelled) Link to comment
dzek (varez) Posted July 8, 2010 Share Posted July 8, 2010 blind? https://wiki.multitheftauto.com/wiki/AddCommandHandler example 4.. Link to comment
gudenmike Posted July 9, 2010 Author Share Posted July 9, 2010 ffs varez i know AddCommandHandler i were the outputchatbox i had problems with but anyways its fixed now Link to comment
dzek (varez) Posted July 9, 2010 Share Posted July 9, 2010 i know you know addCommandHandler, but i wanted to show you that your problem was explained in example number four on addCommandHandler wiki page. so you didnt read carefully. thats all 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