New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ITEM rp-radio #11
Comments
Hey! You can create the item with this form:
|
But rp-radio doesn't have a server file. Where should i put the code ? |
You can register on esx_basicneeds, or another scripts with server-side! Or you can create one script apart with this (you can call with the name like you want): fxmanifest.lua: fx_version 'adamant'
game 'gta5'
server_script 'server.lua' server.lua: ESX.RegisterUsableItem('radio', function(source)
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('Radio.Set', source, true)
end) |
when i remove the radio item in my inventory i can still use radio |
@mindiw01 it's clearly not like that, your exemple it's for make the item radio usable and your exemple it's wrong.
|
Figured it out. (New user to Mumble) In Client.lua put this at the top
Then at the radio command Replace it with mine
Server.lua put this
|
when i remove the radio item in my inventory i can still use radio |
Did you restart the server after doing what i said? |
Yep |
Hmm, i mean its a start im getting that as well but If anyone else can help contribute? We have it so it works if you use but if you remove radio you can still use |
I put server.lua one to esx_basicneeds, is that bad? |
I made the server.lua in the radio file. Its already in the manifest so all you do is make the file and call it server.lua |
And this will fix my issue? |
Possibly? I cant use the radio when i don't have it but if im on a radio channel it stays but i haven't coded that in yet as i haven't looked at mumble for long |
Its not taking radio even out, but when i add radio to registable item its taking radio out but when i drop it its still usable |
I got a solution at server.lua add this TriggerEvent('esx:getSharedObject', function(obj) ESX.RegisterServerCallback('rp-radio:getItemamount', function(source, cb, item) At the client.lua add this Citizen.CreateThread(function() |
So anyone got the script? |
i use the basic rp-radio from frazzle and works perfectly |
Thanks for the quite pointless message. The issue is about using a radio item. |
Yes its here in the github |
In the type of message, no need you are at the top .. to criticize and give no solutions We have already given solutions in passing;) |
i am not sure but the solution there is showing Figured it out. (New user to Mumble) In Client.lua put this at the top ESX = nil Citizen.CreateThread(function()
Server.lua put this ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX.RegisterServerCallback('rp-radio:getItemAmount', function(source, cb, item)
end) is it not missing the part that is telling what item there is needed ???? |
|
okay is just it dont works for me i have too set it, so u can use radio without having the radio and there is no errors in the console or F8 menu |
Tomorrow i can upload whole radio script. So u can just download it |
I would be very grateful |
i want the radio as a item too :/ |
that would help a lot :) thanks |
when will u uploade the script ??? |
If you have the item stuff fixed and you guys want to solve the issue players can still hear you even they dont have an radio add this: (in client) |
what do u mean this event do ??? cuz for me its dont sound like the problem we are having can be me there is wrong |
I found a way too make it work ESX.RegisterUsableItem('radio', function(source) local xPlayer = ESX.GetPlayerFromId(source) TriggerClientEvent('Radio.Set', source, true) TriggerClientEvent('Radio.Toggle', source) end) past that in ur server.lua |
Does anyone have a pre written script for it? |
i have show the script part there is need right over ur comment |
here u go |
Doesnt work normaly cuz i have the item i can use it but when i drop it i can still open it with Shift + F3 |
its not working as toko voip for that u need u rewhite the whole item system in the script |
I tried using this, using my hotkeys to bring it up. shift and f10
anything else i would need to do? |
u have to go in ur inventory and say use radio before u can use it |
if i open my inventory i cant open the chat box |
okay what framework are u using ??? |
esx 1.1 up to date |
ty ty |
Hi! so i installed this remade script and it is loaded and i even have the radio in my inventory, but for some reason i cannot get it to work, ive tried the keybind and the command thanks in advance |
Add this to the top of client.lua Then below the local radio part add this:
Add this to server.lua (you can create a server.lua file in rp-radio and it will work right away)
I coded this and it worked. This was using ESX v1 Final, so you should use that |
hey, would you be able to fix an issue where you need to restart the script every time you load into the server? i know the issue, just not how to fix it. its calling the radio or something before the character is even loaded in, so it needs a restart to work. i had the same issue with my dispatch. i had to TriggerEvent in my multichar script after the character has fully loaded. but im not sure what to trigger in this radio script. |
Try mine https://github.com/pablordgez/rp-radio and tell me if it works |
this works very well :) TY |
Hi i have this error : SCRIPT ERROR: @rp-radio/server.lua:10: attempt to call a nil value (field 'triggerEvent') |
Just use this code. Add this in the server.lua:
|
Hi ! I want create item with you rp-radio did you have an tips for create this ^^ ?
The text was updated successfully, but these errors were encountered: