Phone System
whip_phone is the Duo, a phone that unfolds into a tablet. Calls, texts, banking and jobs are apps on it, and every app is a module, so a server leaves out the ones it doesn't want and your resource can add its own.
It ships with WHIP and makes its own tables on its first start. Calls need a voice system: while whip_voice isn't running, every phone shows "Voice connection failed, is the voice resource started?" and can't be used. The phone and WHIP is what it builds on, Phone apps adds an app, and Phone API reaches a phone from a script.
Getting a phone
- Get a
phoneand asim_card. Sell them in a shop, or take them from/whip→ Economy → Items. - Right-click the phone in the inventory, choose SIM tray, and put the SIM in.
- Press F3.
A SIM card is a new number for whoever buys it or is given it. One made for nobody, such as a SIM in a stash or a Director reward, gets its number the first time someone puts it in a phone, and the number is theirs.
Using it
| To | How |
|---|---|
| Take it out or put it away | F3, Phone on the wheel (F1), or D-pad up on a controller. Use on a phone in the inventory opens that phone |
| Answer or decline a call | Y or U, with the phone out or put away. A call ringing while the phone is away peeks up from the corner with both buttons |
| Unfold it into a tablet | Y on a controller. With the mouse, the fold button in Control Centre (the status bar's icons) |
| Go back | Esc or Backspace, or B on a controller. The arrow keys and Enter work it without the mouse |
| Arrange the home screen | Drag an app onto any slot. On a controller, X on an app moves it |
Players rebind F3, Y and U in Settings > Key Bindings > FiveM, and move the controller's Phone on the pause menu's Controller screen. With the phone out they keep walking, but can't aim, shoot, look around or open the weapon wheel, and the pause menu stays shut. A drawn gun is holstered as the phone comes out. Being knocked down puts it away, and dying or logging out also hangs up a call.
Numbers and SIM cards
- A number belongs to a character, who may own several. Whoever has its SIM in their phone is that number: they call and text as it, and see its contacts, messages, calls and blocked numbers. Its wallpaper, sounds, home screen and contact card go with the SIM too.
- Bank and Business are always the character holding the phone, whatever SIM is in it.
- Settings > SIM lists your own numbers. Lock one and its SIM works in no phone, wherever it is, and a call on it ends.
- With several phones on you, F3 and the wheel open the one in the inventory strip's Phone slot, else the first in your pockets. While whip_phone runs, that slot takes only phones.
Calls
You talk on a call with your usual push-to-talk key, and the people around you still hear you. On speaker, the people near the phone hear the other side, and the other side hears them. A call rings for 30 seconds before it's missed. It ends when either side hangs up, dies, logs out or leaves, when the phone or its SIM leaves their pockets, when the number is locked, or when the voice system stops.
A call's volume is the player's Phone call volume, one setting in two places: the phone's Settings > Sounds and the pause menu's Settings (Server → Chat & voice).
Blocking a number
Block a number from its conversation in Messages or its page in Phone, and unblock it in Settings > Blocked numbers. Its texts and calls stop reaching your SIM, and its owner isn't told: their texts show as sent and their calls ring out. The block list belongs to the SIM, so it goes where the SIM goes. Lore characters can't be blocked.
The apps
| App | What it does |
|---|---|
| Phone | Recents, contacts, the keypad and the call screen |
| Messages | Text conversations |
| Bank | Your accounts and their activity, transfers, opening savings and shared accounts, and sharing one. Money someone else pays into your own account shows a notification that opens it |
| Business | Your jobs and going on or off duty and, for ranks that may, hiring, firing and ranks |
| Settings | Your contact card (a name and a picture), wallpaper, sounds, SIM, blocked numbers, Do Not Disturb and installed apps |
Sharing an account and hiring someone send an invite that the other player accepts on their own phone. Config.Modules lists the apps that load: take an id out and that app is gone from every phone. Keep skillcheck, which has no icon and plays the skill check games.
Lore characters
Each of the Director's lore characters has a phone number that no character owns. Texts sent to one are kept and never answered, and calls to one ring out. The Director's Lore cards use them: Give Contact puts one in a player's contacts, Send Text texts as them, and Phone Call rings a player and plays a recording as them talking (Lore phone calls). A lore character's text or contact goes to the SIM in the player's phone, or waits on a number of theirs.
Skill check games#
Seven games play on the tablet: Brute Force, Code Recall, Fragment Match, Override, Reroute, Safe Crack and Stabilise. Choose one as the Game of the Director's Skill Check card, or ask for one in a SkillCheck. The phone comes out unfolded, held to the game until it's over, and Back gives up. A player with no phone is told "You need a phone!" and nothing starts, which isn't a fail: they can try again with one.
-- Server, in a SecureEvent handler: true when they cracked it
local passed, why = Whip.core:SkillCheck(source, 'hard', { game = 'phone.safecrack' })SettingsServer owners#
In whip_phone/config.lua:
| Setting | Default | Changes |
|---|---|---|
Config.OpenKey, AnswerKey, DeclineKey | 'F3', 'Y', 'U' | The default keys. A new default reaches only players who haven't bound the key yet |
Config.PhoneSize | 0.5 | The folded phone's height, as a share of the screen's |
Config.Modules | phone, messages, bank, business, settings, skillcheck | The apps every phone has. A new built-in app also needs its own line in whip_phone's files {} |
Config.DeveloperApps | { 'skilltest' } | Apps only players with developer mode on (/w) get |
Config.GameClock | true | The status bar shows the game's time. false: the player's real clock |
Config.BlockControls | combat, look, vehicleCombat, weaponWheel | The control groups held off while the phone is out. Walking stays free |
Config.Emotes | phone, tablet | The emote played while the phone is out, and while it's unfolded. '' plays nothing |
Config.Defaults | dusk, marimba, note, ding, 75 | A fresh phone's wallpaper, ringtone, message tone, notification tone and volume (the choices are listed beside it) |
Config.NumberPrefixes | 689, 041, 227, 869, 915 | A new number is one of these and 7 random digits |
Config.RingSeconds | 30 | How long a call rings before it's missed |
Config.MessageHistory, RecentCalls | 300, 50 | How many of a number's messages and calls the phone loads |
Config.CallSound | a telephone line | How a call sounds: a recipe of whip_voice's sound blocks (whip_voice/shared/sound_blocks.lua) |
Config.SpeakerRange | 8 | How far a phone on speaker carries, in metres (1 to 30) |
Config.VoiceDownText | Voice connection failed… | What every phone shows while no voice system runs |
Config.SkillGameNoPhone | You need a phone! | What a player with no phone is told when a phone game would start |
Config.SkillGames | three levels each | Each game's easy, medium and hard, explained beside them. enabled = false takes a game out, and the Director stops offering it |
Admin and testingServer owners
/whip→ Phones lists every number. Open one to see whose it is and what it holds, change it, give yourself its SIM card, delete it, or read its messages and calls (Dev Tools).- The Skill Check Tester app shows on your phone while developer mode is on (
/w). It plays the ring or any phone game at any level, with numbers you change for the test and never saved. /lorecall <recording>, with developer mode on, has a lore character phone you with a recording, to hear the voice bot (Lore phone calls).
When it doesn't work
| It says | Do |
|---|---|
| You need a phone | Give the player a phone. It has to be on them, not in a stash or a car |
| No SIM card · SIM locked | Put a SIM in the phone's SIM tray, or unlock the number in Settings > SIM on its owner's phone |
| This SIM does not work | Its number was deleted in /whip → Phones. Give the player a new SIM |
| Voice connection failed, is the voice resource started? | Start whip_voice. /voicecheck says what's wrong with it (Setting up whip_voice) |
| You can't use your phone right now | The player is down. The phone opens again once they're back up |