Lukkaz Posted January 1, 2011 Share Posted January 1, 2011 Hello mta community, I have an idea for a way to simulate a radio chat with channels and all. Please leave any feedback and reasons why it wouldn't work or would aid the resource: So first off we have to create the item for the server giving a unique id, using the id we allow it to change the players team, we create say 100 teams all with numerical names and integrate a command such as /setradiochannel and that way factions can set their channel to the same channel to take full benefit of the team chat. Please share questions, ideas, and ways to make the resource better. I will release it to the community when complete. Thanks Guys Link to comment
Luke_Ferrara Posted January 3, 2011 Share Posted January 3, 2011 If you give an item (radio or phone whatever you want) a value and then use the setPlayerTeam as your /setchannel command an example ---establish the radio feq. function radioChannels () 111.110 = createTeam ( "111.110", 0, 255, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), radioChannels ) ---allow the player to change the channel for different team chat function changeChannel ( source, commandName, channelName ) local channel = getTeamName(channelName) if channel then setPlayerTeam" class="kw6">setPlayerTeam" class="kw6">setPlayerTeam(source,channel) end end addCommandHandler ( "changechannel", changeChannel ) *above should be setPlayerTeam(source,channel) I don;t know why it keeps adding the "kw6"* I'm pretty sure this will work it's untested but a second opinion maybe? I'm not sure how you to go abut implementing the radio giving it a value and such. 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