This is probably my best resource so far, up there with the lobby menu.
Behold, scalePhone - the GTA5 Phone framework
What this resource is:
A framework. You can build apps (read: menus), based on the different templates, like:
Contacts list,
Call Screen,
Message list / view
Email list / view
Numpad
Settings menu (prebuilt app)
Snapmatic (prebuilt app)
“To Do” list / view menus.
GPS (Coords and Zone Name) View (prebuilt )
Generic list menu.
What this resource is NOT:
It’s not a full phone! You can’t call / message anyone by default. You will have to build the logic yourself (or ask someone else to do it)
How it works:
You pretty much have to push the data into the phone. And I set up some nice events to help you out!
--examples. All events will be available in the github Wiki
TriggerEvent('scalePhone.BuildHomepageApp', appID, appType, appName, appIcon, appNotificationInt--[[only working on homepage apps]], openEvent, backEvent, data)
TriggerEvent('scalePhone.BuildThemeSettings', appID)
TriggerEvent('scalePhone.BuildSnapmatic', appID)
Every menu(app) will trigger a “openEvent” whenever it’s…opened, and a “backEvent” whenever you hit the back button in the menu (this also needs to handle moving between apps). Both triggers will pass a custom “data” param, which can be an array, bool, int, whatever.
Moreover, every button time you select a button, it will trigger the event connected with that button, and a button-specifi eventParams variable.
Here is a working example on how to setup a working “Numpad” app.
--[[ initial app building ]]
TriggerEvent('scalePhone.BuildHomepageApp', 7, "numpad", "Numpad", 27, 0, "scalePhone.OpenNumpad", "scalePhone.GoToHomepage", {})
local pad = 0
numpadNumber = 0
for i=1,9,1 do
pad = {text = i, event = "scalePhone.NumpadAddNumber", eventParams = {add = i}} -- "scalePhone.NumpadAddNumber" is a prebuilt event that adds text to the numpad screen
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
end
pad = {text = 'RES', event = "scalePhone.NumpadAddNumber", eventParams = {add = 'res'}}
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
pad = {text = 0, event = "scalePhone.NumpadAddNumber", eventParams = {add = 0}}
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
pad = {text = 'GO', event = "phone.UseNumpadNumber", eventParams = {add = 'go'}} -- "phone.UseNumpadNumber" will be our handler
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
-- [[ handlers ]]
AddEventHandler('scalePhone.Event.GetNumpadNumber', function(number) -- prebuilt event. triggered whenever the numpad text is changed.
numpadNumber = number --numpadNumber will be our "to use" variable
end)
AddEventHandler('phone.UseNumpadNumber', function() --event triggered by the "GO" button on numpad.
if numpadNumber == "20121999" then
print('you found the secret number!')
else
print('invalid number!')
end
end)
At the moment, the framework will only show the first nine homepage apps. There might be a way to increase that (I know R* does it), but for some reason the scaleform doesn’t like to load more than that.
I might need to rethink how the homepage view works…at some point.
The Wiki has (currently incomplete) examples on how to add every type of app. You can find an example of the numpad app here.
For more app icons… the scaleform most likely needs to be edited and streamed again (if that even works).