Jump to content

[Help]/[Req] Rp radio


Recommended Posts

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)

:)

Link to comment
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?

Link to comment

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

Link to comment

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

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

Link to comment
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.

Link to comment

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