[qbcore] community service

Today i made better community service with qb-input

YOUTUBE
GITHUB

Extra Functions
Saves Coms to metada ( no database required)
If u restart script coms automaticly loads

Using qb-input better usage

MENU IMAGE

image

SETUP
qbcore/server/player.lua
QBCore.Player.CheckPlayerData
Under the function

add qbcore/client/functions

function QBCore.Functions.RequestAnimDict(animDict)
	if HasAnimDictLoaded(animDict) then return end
	RequestAnimDict(animDict)
	while not HasAnimDictLoaded(animDict) do
		Wait(0)
	end
end```
 PlayerData.metadata["communityservice"] = PlayerData.metadata["communityservice"] ~= nil and PlayerData.metadata["communityservice"] or 0

Requirements
qb-input

All Credits
esx_communityservice

2 Likes

can you add staff check also police and admin please

could i do for esx?

it checks police and sheriff now

yes , with esx input script

having issue with the animation request. Says error when attempting to sweep.

add qbcore/client/functions

function QBCore.Functions.RequestAnimDict(animDict)
	if HasAnimDictLoaded(animDict) then return end
	RequestAnimDict(animDict)
	while not HasAnimDictLoaded(animDict) do
		Wait(0)
	end
end```
2 Likes

so i can use this scripts in esx?

not for now

thank you

1 Like

where are we supposed to put that?

yes u have to do

where? i could never figure out where its suppsed to go

qbcore/server/player.lua

yes exactly thx for helping to @eurowabbit