Kutlu35 Posted January 23, 2020 Share Posted January 23, 2020 Hello i wanna make a tray notification when new map launchs. You know creatin tray notification is client sided thing and i need get maps name on notification. I tried make a bridge with triggering events but i couldn't do it. Thanks. Link to comment
Motar2k Posted January 24, 2020 Share Posted January 24, 2020 -- CLIENT mapName = "" function requestMapName() triggerServerEvent("requestMapName", localPlayer) end addEvent("getMapName", true) function getMapName(name) mapName = name end addEventHandler("getMapName", getRootElement(), getMapName) --SERVER addEvent("requestMapName", true) function requestMapName() local mapName = getMapName() if mapName and mapName ~= "None" then triggerClientEvent(source, "getMapName", source, mapName) end end addEventHandler("requestMapName", getRootElement(), requestMapName) when using the "requestMapName" function, the "mapName" variable will equal the name of the current map 1 Link to comment
Kutlu35 Posted January 29, 2020 Author Share Posted January 29, 2020 On 24/01/2020 at 21:34, Motar2k said: -- CLIENT mapName = "" function requestMapName() triggerServerEvent("requestMapName", localPlayer) end addEvent("getMapName", true) function getMapName(name) mapName = name end addEventHandler("getMapName", getRootElement(), getMapName) --SERVER addEvent("requestMapName", true) function requestMapName() local mapName = getMapName() if mapName and mapName ~= "None" then triggerClientEvent(source, "getMapName", source, mapName) end end addEventHandler("requestMapName", getRootElement(), requestMapName) when using the "requestMapName" function, the "mapName" variable will equal the name of the current map didn't test it yet but thanks for effort Link to comment
Motar2k Posted February 3, 2020 Share Posted February 3, 2020 On 29/01/2020 at 11:39, Kutlu35 said: didn't test it yet but thanks for effort You're welcome 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