A simple script that will allow you to display an icon with text above the player's head (or NPC)
LUA
-- Client
local amount = 10
local iconType = 'rp' -- 'rp' | 'cash' | 'ammo'
local ms = 1500
local target = GetPlayerPed(-1)
TriggerEvent('showIconUnderhead', amount, iconType, ms, target)
JavaScript
// Client
const amount = 10
const iconType = 'rp' // 'rp' | 'cash' | 'ammo'
const ms = 1500
const target = GetPlayerPed(-1)
emit('showIconUnderhead', amount, iconType, ms, target)