This is a custom phone written for Mythic RP. It is replacing an existing port of GCPhone after having loads of issues with trying to successfully port. This is very much a Work In Progress and you should not even look into using this unless you're prepared to do a shitload of work.
This is a WIP resource so this dependency list is very likely to expand as features are added.
local tPlayer = exports["mythic_base"]:FetchComponent("Fetch"):Phone(data.number) ---> local tPlayerId = exports["utils"]:getIdentifierByPhoneNumber(data.receiver) tPlayer:GetData("source") ---> local tPlayerSourceID = ESX.GetPlayerFromIdentifier(tPlayerId).source
Text Messages: Unread messages Indicator at the bottom
Calls: E to hold G to hangup dont work
Calls : Mute Hangup Call : Contacts History Answer Talking Delete
Messages : Send Receive Delete Call
Contacts : Add Delete Edit Call Message Search
Due to the scope of this project expanding I've ended up adding in some various resources to aid in making the files that need to be included for the phone to funciton in-game end up minified and compressed into as few files as possible but while retaining readability and breaking up the code into logical sections. So due to this you'll need a few things in order to get this working from the source alone.
- JS - Due to how I have the JavaScript structured I have opted to setup webpack to minify the files into a single file. This makes it far easier to add content in the future and not have to mess around with importing as well as ensures the file that's being included in the manifest file will always be the one that has all the data for it. Not sure if there's any sort of major performance issues. When you clone the repo, cd into the html folder and use command
yarn
if you have yarn ornpm install
if you're using npm and it will install all the required dependencies. After that runyarn run build
ornpm run build
and it will build the minified build.js file needed.
Note: You can in theory just change the manifest to include the regular JS files as well as add them being included in the HTML file and it'll work. But I will not give any guarantee that it'll work doing so. It's also using ES6 modules so you may end up with errors because of that.
You not shit with webpack? Feel free to get the stupid thing to work & pack all depedencies needed and make a pull request. Because I cannot for the life of me get that dumbshit to work