[HELP] Open a menu only if you have a specific job?

Hi, I need help of the community because i’m trying to release some scripts but i’m alway stuck when is the time to open a specific menu only if you have the right job but I’m trying to find something in a lot of script but i can’t understand how it’s work so if someone can help me ? P.S: I’m french and english too :wink: Screen : https://gyazo.com/d160a1f52fce893b2e2a58793fa587d0 https://gyazo.com/5ee25a9d45f61900b621b4877c5493b7

this mod looks nice

but i cant help you sry

You have the jobsystem?

Yes ! you’re french no ?

function nameJob(player)
  local executed_query = MySQL:executeQuery("SELECT identifier, job_id, job_name FROM users LEFT JOIN jobs ON jobs.job_id = users.job WHERE users.identifier = '@identifier'", {['@identifier'] = player})
  local result = MySQL:getResults(executed_query, {'job_name'}, "identifier")
  return tostring(result[1].job_name)
end

and use

local namejob = nameJob(player)
    -- NAME OF YOUR JOB
    if namejob == "Mineur" then

Tanks you so much i will test it right now !

function nameJob goes in server.lua and local namejob in client.lua ?

all in server.lua ^^

Wait i’m giving you some screen

Because all my HUD is in client.lua so i what i need to do after the then in server.lua

you can create a code line to open the menu in server.lua ! :slight_smile:

Okay do you have an idea how ?

You can send your code to open the menu ? :wink:

yes for sure ! let’s me 2 sec

if IsControlJustPressed(1,51) and IsPlayerInRangeOfweashop() then
if weashop.opened then
CloseCreator()
else
OpenCreator()
end
end

IsControlJustPressed(1,51) and IsPlayerInRangeOfweashop() and Jobname == “Mineur” for exemple ?

Yes, have you teamspeak?

Yes you have one or you want my ?

Join me ^^ alcatrazrp.ts3serv.com

No more idea ? Please I really need help ! I’m with Job system !