/revive need some help


am trying to make a /revive script with ped restriction but am still learning do you guys think this is gonna work?



or do i use RegisterCommand insteed of RegisterNetEvent?


Use something like this:

local models = {
    "s_m_y_cop_01", -- and add all your others here too

RegisterCommand("revive", function()
    local ped = PlayerPedId()
    local pedModel = GetEntityModel(ped)
    local allowed = false
    for _,model in pairs(models) do
        if pedModel == GetHashKey(model) then
            allowed = true
    if allowed then
        -- do your reviving here
        TriggerEvent("chatMessage", "", {255,255,255}, "^1You are not allowed to use this command.")


thank you so much :slight_smile: am trying to learn but its so hard :frowning:


dint work :L hmmmmmmm


Are you using a custom chat resource?


not sure am using the esx framework, but when am not in the cop ped its says i dont are allowd to use the command, but in the skin when i tried it it dint say anything. or my friend dint het revived


all off my members cannot use /revive - any idea?

no permissions