Skip to content

Conversation

@BackSH00TER
Copy link
Contributor

Pull Request Description

This PR adds support for giving contact details to other nearby players.
It will get the closest player and will open their phone onto the fill new contact screen with the name and number prefilled. The user then just has to save it.

To use this, users would be expected to update their radial menu to use the 'npwd:GiveContactDetails event.
Example w/ qb-radialmenu

{
    id = 'givenum',
    title = 'Give Contact Details',
    icon = 'address-book',
    type = 'client',
    event = 'npwd:GiveContactDetails',
    shouldClose = true
},

If one already exists it will show the already populated contact card and the user can update it from there.

Example:
https://clipchamp.com/watch/9zspIfzTHbG

  • Sharing when nobody is around will notify you that nobody is nearby
  • Sharing to a new player will open their phone to the contacts page with the info filled out
  • Sharing to a player that already has your contacts opens to the page to edit the contact details

Pull Request Checklist:

  • Have you followed the guidelines in our Contributing document and Code of Conduct?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you built and tested NPWD in-game after the relevant change?

import { ContactEvents } from '@typings/contact';
import { RegisterNuiProxy } from './cl_utils';

const QBCore = global.exports['qb-core'].GetCoreObject();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is supposed to be as standalone as possible, we cannot use any third party library. We have these exports for external use only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants