Exports

getCrew()

  • You can use this export client/server side, it will return false if the player is not a crew member or a table with all crew details:

your_client_file.lua
-- This is an example using the export client side:
RegisterCommand("getCrew", function()
    local myCrew = exports['av_racing']:getCrew()
    if myCrew then -- returns a table {name:string, label:string and isBoss:boolean}
        print("Crew Name: "..myCrew['name'])
        print("Crew Label: "..myCrew['label'])
        print("Crew Label: ", myCrew['isBoss'])
    else
        print("Not a crew member")
    end
end
your_server_file.lua
-- This is an example using the export server side:
RegisterCommand("getCrew", function(source,_)
    -- When using the export server side you need to send the player source
    local myCrew = exports['av_racing']:getCrew(source)
    if myCrew then -- returns a table {name:string, label:string and isBoss:boolean}
        print("Crew Name: "..myCrew['name'])
        print("Crew Label: "..myCrew['label'])
        print("Crew Label: ", myCrew['isBoss'])
    else
        print("Not a crew member")
    end
end

Last updated