NP style edits and additionals for qb-phone, help from a few community members. NOT PROVIDING SUPPORT

Overview

grab-landing-page

qb-phone

Phone for QB-Core Framework. Edited for a NP-Style look with a few extra things, This file has been edited with the changes noted

NOTE

NP does NOT have a suggested contact feature, therefore the tab for that in the Phone app has been removed. You can use /p# to show your number in chat in a small radius around you, or manually input the contacts.

Known Issues

if you call from a payphone without a cell phone there is no way to hang up the call. The other person has to hang up the call. After they do that then the phone UI is stuck on your screen

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

Dependencies

  • qb-core
  • qb-policejob - MEOS, handcuff check etc.
  • qb-crypto - Crypto currency trading
  • qb-lapraces - Creating routes and racing
  • qb-houses - House and Key Management App
  • qb-garages - For Garage App
  • qb-banking - For Banking App
  • screenshot-basic - For Taking Photos
  • A Webhook for hosting photos (Discord or Imgur can provide this)
  • Some sort of help app for your Help icon to function, just place your event for opening it in client.lua line 2403
RegisterNUICallback('openHelp', function()  
    TriggerEvent('eventgoeshere')  <---------
end)

Screenshots

Home Messages Phone Settings MEOS Vehicles Email Advertisements Houses Services Racing Crypto Debt Wenmo Invoices Casino News Notepad Details JobCenter Employment Calculator

Features

  • Garages app to see your vehicle details
  • Mails to inform the player
  • Debt app for player invoices, Wenmo for quick bank transfers, Invoice app for legal invoices
  • Racing app to create races
  • MEOS app for police to search
  • House app for house details and management
  • Casino app for players to make bets and possibly multiply money
  • News app for news postings
  • Details tab for some player information at the palm of your hand
  • Tweets save to database for recall on restarts, edit how long they stay in config
  • Notepad app to make and save notes
  • Calculator app
  • Job Center and Employment apps just like the NoPickle

Installation

Manual

  • Download the script and put it in the [qb] directory.
  • Import qb-phone.sql in your database
  • Add a third paramater in your Functions.AddMoney and Functions.RemoveMoney which will be a reaosn for your "Wenmo" app to show why you sent or received money. To do this you search all of your files for these 2 functions and add a reason to it.. Ex:
Player.Functions.AddMoney('bank', payment)

would then be

 Player.Functions.AddMoney('bank', payment, "paycheck")
  • Add the following code to your server.cfg/resouces.cfg
ensure qb-core
ensure screenshot-basic
ensure qb-phone
ensure qb-policejob
ensure qb-crypto
ensure qb-lapraces
ensure qb-houses
ensure qb-garages
ensure qb-banking

Setup Webhook in server/main.lua for photos

Set the following variable to your webhook (For example, a Discord channel or Imgur webhook)

To use Discord:

  • Right click on a channel dedicated for photos
  • Click Edit Channel
  • Click Integrations
  • Click View Webhooks
  • Click New Webhook
  • Confirm channel
  • Click Copy Webhook URL
  • Paste into WebHook in server/main.lua
local WebHook = ""

To fixed undefined reason in Wenmo

  • Go to qb-core/server/player.lua
  • Replace this
    self.Functions.AddMoney = function(moneytype, amount, reason)
        reason = reason or 'unknown'
        local moneytype = moneytype:lower()
        local amount = tonumber(amount)
        if amount < 0 then
            return
        end
        if self.PlayerData.money[moneytype] then
            self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] + amount
            self.Functions.UpdatePlayerData()
            if amount > 100000 then
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype], true)
            else
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
            end
            TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, false)
            return true
        end
        return false
    end
    self.Functions.RemoveMoney = function(moneytype, amount, reason)
        reason = reason or 'unknown'
        local moneytype = moneytype:lower()
        local amount = tonumber(amount)
        if amount < 0 then
            return
        end
        if self.PlayerData.money[moneytype] then
            for _, mtype in pairs(QBCore.Config.Money.DontAllowMinus) do
                if mtype == moneytype then
                    if self.PlayerData.money[moneytype] - amount < 0 then
                        return false
                    end
                end
            end
            self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
            self.Functions.UpdatePlayerData()
            if amount > 100000 then
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype], true)
            else
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
            end
            TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, true)
            if moneytype == 'bank' then
                TriggerClientEvent('qb-phone:client:RemoveBankMoney', self.PlayerData.source, amount)
            end
            return true
        end
        return false
    end
  • To this
    self.Functions.AddMoney = function(moneytype, amount, reason)
        reason = reason or 'unknown'
        local moneytype = moneytype:lower()
        local amount = tonumber(amount)
        if amount < 0 then
            return
        end
        if self.PlayerData.money[moneytype] then
            self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] + amount
            self.Functions.UpdatePlayerData()
            if amount > 100000 then
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype], true)
            else
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
            end
            TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, false, reason)
            return true
        end
        return false
    end
    self.Functions.RemoveMoney = function(moneytype, amount, reason)
        reason = reason or 'unknown'
        local moneytype = moneytype:lower()
        local amount = tonumber(amount)
        if amount < 0 then
            return
        end
        if self.PlayerData.money[moneytype] then
            for _, mtype in pairs(QBCore.Config.Money.DontAllowMinus) do
                if mtype == moneytype then
                    if self.PlayerData.money[moneytype] - amount < 0 then
                        return false
                    end
                end
            end
            self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
            self.Functions.UpdatePlayerData()
            if amount > 100000 then
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype], true)
            else
                TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
            end
            TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, true, reason)
            if moneytype == 'bank' then
                TriggerClientEvent('qb-phone:client:RemoveBankMoney', self.PlayerData.source, amount)
            end
            return true
        end
        return false
    end
Comments
  • App Garages: Cars not showing

    App Garages: Cars not showing

    Hello I am using the latest version of qb-garages and my owned vehicles does not appears to show up in our garage app.

    image

    image

    Thank you for all your work :D

    opened by Kwoonie 12
  • Phone stuck on screen after hangup

    Phone stuck on screen after hangup

    We have an issue in our server where if someone hangs up the call, the person who did not open their phone to hangup will keep the phone & call notification on their screen, If they open the phone at any point after the call, both the notification will disappear and they will have to close their phone again as normal. This is occuring with a fresh install of this resource. It is almost as if the container it is trying to remove isnt referenced but as I am not the best in .js I have been unable to prove this theory.

    I did notice that after having the call hang up the person who did not hang up receives the below NUI error: (I've left this here even though I believe this to also appear after hanging up on the default qb-phone aswell)

    Uncaught TypeError: Cannot read property 'icon' of undefined (@qb-phone/html/js/app.js:629)

    opened by hdsunbed 11
  • 'Give contact' not working

    'Give contact' not working

    Hey! Love the phone. Slight issue. When a player uses 'F1' and selects give contact, the recipient player gets a notification on their phone. However, the recipient player gets no notification within the phone app to add this newly suggested contact to their contact list... Suggestions? Thanks!

    opened by BlinbD 2
  • [SUGGESTION] Phone improvment

    [SUGGESTION] Phone improvment

    Hello there, good work btw

    Apps:

    • Make item check on apps?
    • Add a business app for specific jobs where business owners can hire/fire people and see the info about their employees (I'll pay for it to get done :D)
    • since you went with no pixel style maybe add the "wifi" so when connected players can see the specific app? also player needs to be in a specific spot/zone to connect to the wifi
    • In Addition to Project Sloth making an MDT with a dispatch system I don't think there is a need for meos app on the phone.

    Btw if you are down to the business app for the phone and get paid for it lmk on discord so we can make a deal with that.

    opened by ImpulseFPS 2
  • Uncught TypeError

    Uncught TypeError

    Thanks for sharing this amazing phone :)

    I have tested this hard and have only found one error so far. When I use the phoneboot and the other player hang up i get this error and the phone freezez for me.

    https://gyazo.com/573bde152cb63b2dede64ae365e234be

    opened by Howsn 2
  • delete messages?

    delete messages?

    is there a way to clear / delete messages with the phone? when you send the same person alot of messages it starts to get wonky and you have to keep scrolling down to the bottom to see the new message? maybe a way to limit how many messages are seen?

    opened by MG79NC 1
  • Icons dont show up und the bottom line

    Icons dont show up und the bottom line

    I cannot use slot 29-32 for the Icons... Even if I change the number from Maximum 28 to 32 in the config, the icons do not appear. The bottom line remains "empty". Can you please add this?

    opened by PlodyIce 1
  • Display players tweets contents when the notification for a new tweet pops up

    Display players tweets contents when the notification for a new tweet pops up

    I don't know if this an issue or not but the when the notification for the new tweet pop up. It should contains what that user tweeted instead of like "A new tweet has been posted"

    Thanks :)

    opened by Kwoonie 1
  • [Idea] Crypto

    [Idea] Crypto

    The crypto app should be changed so when you open the app you can select a variety of crypto. Like if we want to add more crypto coin we could select the one we want and then it will show, buy, sell or transfer

    opened by KingRyuShin 1
  • Banking & Debt App

    Banking & Debt App

    Banking App does not check if player has money when sending money. So anyone can just send 1mln$ to someone and they will be -1mln

    Debt App does check at first if player has money but after accepting request it does not refresh and u can accept same request unlimited times and it does not check for money, resulting in negative balance.

    opened by idunnoooooo 1
  • ping-app impr. req.

    ping-app impr. req.

    delete ping button will be good. delete accepted ping will be good. (if somebody accept wrong req)

    script has SetTimeout(5 * (60 * 1000), function() bıt need to do it manual i g.

    opened by ghost 1
  • Script Error/ Wrong Date on Emails

    Script Error/ Wrong Date on Emails

    Hey! So I have the following script error whenever an email is received from billing it also creates an undefined email.

    SCRIPT ERROR: @qb-phone/client/main.lua:1558: attempt to concatenate a nil value (field 'sender')

    Also I'm having issues with wrong date on the emails.

    opened by Wendel101 0
  • PlayerData error  when using camera

    PlayerData error when using camera

    Everytime people take a picture, it says touching up photo, and then it locks you in camera and you cant get out. PlayerData error was on client/main - 1436. Picture does not save or go to Discord Webhooked channel

    opened by Sulb0 0
  • Another XSS in profile picture.

    Another XSS in profile picture.

    To reproduce, add "><script>$('body').prepend(`<img src='https://www.shareicon.net/data/128x128/2016/03/22/737770_bar_512x512.png\'>`)</script><img style="display:none;" to the end of your profile picture link

    opened by stevn999 0
Owner
clmillzz
clmillzz
Facile is an HTML form validator that is inspired by Laravel's validation style and is designed for simplicity of use.

Facile is an HTML form validator that is inspired by Laravel's validation style and is designed for simplicity of use.

upjs 314 Dec 26, 2022
A simple and composable way to validate data in JavaScript (and TypeScript).

A simple and composable way to validate data in JavaScript (and TypeScript). Usage • Why? • Principles • Demo • Examples • Documentation Superstruct m

Ian Storm Taylor 6.3k Jan 9, 2023
Codestamp - Stamp and verify your files and contents

A language-agnostic tool for signing and verifying your (codegen'd) files and contents.

Keyan Zhang 4 Jan 26, 2022
FieldVal - multipurpose validation library. Supports both sync and async validation.

FieldVal-JS The FieldVal-JS library allows you to easily validate data and provide readable and structured error reports. Documentation and Examples D

null 137 Sep 24, 2022
jQuery library to validate html forms. compatible with bootstrap v4 and bootstrap v3

jQuery form validation jQuery form validation is a library that helps you to validate your HTML form, it's completable with both Bootstrap 3 and Boots

Bassam Nabriss 33 Jun 10, 2021
The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)

Ajv JSON schema validator The fastest JSON validator for Node.js and browser. Supports JSON Schema draft-06/07/2019-09/2020-12 (draft-04 is supported

Ajv JSON schema validator 12k Jan 4, 2023
GUI for editing, visualizing, and manipulating JSON data

JSON-Splora JSON-Splora is a GUI for editing, visualizing, and manipulating JSON data with jq or JavaScript. Design Built with Electron Editor and out

Wells Johnston 1.8k Dec 25, 2022
ForgJs is a javascript lightweight object validator. Go check the Quick start section and start coding with love

Hey every one im really happy that this repo reached this many stars ?? ,but this repo needs your contibution I started to better document the code th

Hamdaoui Oussama 1.7k Dec 21, 2022
Schema-Inspector is an JSON API sanitisation and validation module.

Schema-Inspector is a powerful tool to sanitize and validate JS objects. It's designed to work both client-side and server-side and to be scalable wit

null 494 Oct 3, 2022
:white_check_mark: Easy property validation for JavaScript, Node and Express.

property-validator ✅ Easy property validation for JavaScript, Node and Express Built on top of validator.js, property-validator makes validating reque

Netto Farah 160 Dec 14, 2022
Receipt parser webapplication written in javascript and python.

Receipt Manager Webapp You can find pre-compiled releases on the Github release page. All the needed info about how to use the receipt-manager-webapp

null 37 Nov 27, 2022
Validate properties and well known annotations in your Backstage catalog-info.yaml files.

Backstage entity validator This package can be used as a GitHub action or a standalone node.js module GitHub action Inputs path Optional Path to the c

Roadie 39 Dec 26, 2022
Simple and basic javascript form validations

JavaScript-Form-Validations Simple and basic javascript form validations Table of Validations: S. No. Type of validation Link 1 Non-empty text field h

MAINAK CHAUDHURI 23 Dec 17, 2022
Lightweight and powerfull library for declarative form validation

Formurai is a lightweight and powerfull library for declarative form validation Features Setup Usage Options Methods Rules Examples Roadmap Features ?

Illia 49 May 13, 2022
Validate for XML schema and returns all the possible failures

detailed-xml-validator Validate for XML schema and returns all the possible failures Sample Rules file <?xml version = "1.0"?> <students nillable="fa

Natural Intelligence 11 Dec 20, 2022
Helps to encode a string to base64 and decode a base64 string to a normal string.

@prashoonb/base64-encoder-decoder Installation npm install @prashoonb/base64-encoder-decoder API base64.encode(input) This function takes a byte strin

PrashoonB 4 Mar 29, 2022