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 Screen : https://gyazo.com/d160a1f52fce893b2e2a58793fa587d0
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 !
Okay do you have an idea how ?
You can send your code to open the menu ?
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 ?
No more idea ? Please I really need help ! I’m with Job system !