Events
Added Member to Faction
AddEventHandler("wise_faction:faction:memberAdded", function(factionName, playerId)
-- Example for updating ESX xPlayer Job
local xPlayer = ESX.GetPlayerFromId(playerId)
if not xPlayer then
print("ERROR: Player not found")
return
end
xPlayer.setJob(factionName, 1)
end)
Removed Member from Faction
AddEventHandler("wise_faction:faction:memberRemoved", function(factionName, playerId)
-- Example for updating ESX xPlayer Job
local xPlayer = ESX.GetPlayerFromId(playerId)
if not xPlayer then
print("ERROR: Player not found")
return
end
xPlayer.setJob("unemployed", 0)
end)
Last updated