Ambulance Job & Police Job Revive [Need Assistance]


#1

Hello, I am currently trying to make a command that the players with the job ambulance and police can do /revivea and they can revive players so that users do not abuse the /revivea feature.
I have a script that I put in Ambulance from the snippets but I cant seem to get it to check for the job.
Server File not Client File

TriggerEvent('es:addGroupCommand', 'revive', 'admin', function(source, args, user)

  if args[2] ~= nil then
    TriggerClientEvent('esx_ambulancejob:revive', tonumber(args[2]))
  else
    TriggerClientEvent('esx_ambulancejob:revive', source)
  end

end, function(source, args, user)
  TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('revive_help'), params = {{name = 'id'}}})

TriggerEvent('es:addGroupCommand', 'revivea', 'user', function(source, args, user)

  if args[2] ~= nil then
      if PlayerData.job.name ~= 'police' then
    TriggerClientEvent('esx_ambulancejob:revive', tonumber(args[2]))
  else
    TriggerClientEvent('esx_ambulancejob:revive', source)
  end

end, function(source, args, user)
  TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('revive_help'), params = {{name = 'id'}}})

#2

Not a release…
(20 chars)


#3

Ohh SHIT DID I POST THIS HERE DAMN HOLD ON MOVED IT


#4

Could you maybe be a little more specific? What works and what does not work


#5

So Currently I have it working with /revivea threw the usergroup but I would like it to only work for those who have are apart of a job for example ‘ambulance’ or ‘police’ as the specified jobs so people who are RPing cant abuse it


#6
if (PlayerData.job.name == 'ambulance' or PlayerData.job.name == 'police') then