Jump to content

[Help]/[Req] Rp radio


Recommended Posts

Posted

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 :P

but i suck at scripting to be honest anyone here who can help

or maybe make the script for me (i guess its simple)

:)

Posted
function bla ( )
outputChatBox ("help im pinned down at los santos airport", getRootElement(), 0,255,0 )
end
addCommandHandler ("r", bla )

something like that?? :mrgreen:

Posted

ohh no wait cow :D

i needed an script that will make you able to type anything :D

by using /r :D

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 :)

Posted
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)

:D

this is what u want i think :D

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?

Posted

Another one who seems to ignore looking at my links. Or why don't you just use wiki which gives you all the answers?

Posted
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.

Posted

50p i did use your link :P

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 :D

thx solid :D

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 :D

btw no you shoulnt solid thx :)

Posted

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)

Posted
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()"

Posted
you see guys !?

i am using wiki :D

I always recommend you use it on everyday basis.

Posted

hehe 50p i've just began learning to scripting so ive just needed some help :)

hope you understand but i do use the wiki :P

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 :D

Posted
hehe 50p i've just began learning to scripting so ive just needed some help :)

hope you understand but i do use the wiki :P

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 :D

You would know if you read example codes that are on almost every function/event wiki page.

Posted

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

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...