How to set a command only for jobs

image

How can i make this command only for police,ambu,mechanic

1 Like

Add a little check in the registercommand to get the person’s job and then check if it’s police or ambu etc

I can’t really help you as i don’t know what framework you are using to manage jobs

I used esx framework for the jobs

Probably have to get the xPlayer object and then

if xPlayer.job.name == "police" -- or other jobs

yeah i try that but he dont work then :frowning:

1 Like

Can you show your code?

You should close your if using an end

Also did you define xPlayer somewhere?

nice job

ah no mybad … thanks where i need to define the xplayer

Hey, someone can give me all code, because i try but i can’t making works… :confused:

Can i get the code? pls it we help we very mutch