Events & Exports

Server Events

rm_gangs:server:onTributeEventStarted

AddEventHandler('rm_gangs:server:onTributeEventStarted', function(data)
    print(data.name)
    print(data.label)
    print(data.finishDate)
    print(data.paymentAmount)
    print(data.captureDuration)
    print(data.coords)
    print(json.encode(data.territory, {indent = true}))
    print(data.oldOwnerName)
    print(data.oldOwnerLabel)
end)
KeyTypeDescription

name

string

Tribute zone name in cfg file

label

string

Tribute zone label in cfg file

finishDate

number

Timestamp of the event end date

paymentAmount

number

Money that can be received during the time interval set in the cfg file

captureDuration

number

Event duration in the cfg file

coords

vec4

Coordinate of the tribute npc in the cfg file

territory

table

Tribute territory data in cfg file

oldOwnerName

string or nil

Name of the group that owned the tribute territory before the war

oldOwnerLabel

string or nil

Label of the group that owned the tribute territory before the war

rm_gangs:server:onTributeEventFinished

AddEventHandler('rm_gangs:server:onTributeEventFinished', function(data)
    print(data.name)
    print(data.label)
    print(data.paymentAmount)
    print(data.captureDuration)
    print(data.coords)
    print(json.encode(data.territory, {indent = true}))
    print(data.ownerName)
    print(data.ownerLabel)
    print(data.captureDate)
    print(data.oldOwnerName)
    print(data.oldOwnerLabel)
end)
KeyTypeDescription

name

string

Tribute zone name in cfg file

label

string

Tribute zone label in cfg file

paymentAmount

number

Money that can be received during the time interval set in the cfg file

captureDuration

number

Event duration in the cfg file

coords

vec4

Coordinate of the tribute npc in the cfg file

territory

table

Tribute territory data in cfg file

ownerName

string or nil

Name of the new owner of the zone

ownerLabel

string or nil

Label of the new owner of the zone

captureDate

number or nil

Timestamp of the claim date

oldOwnerName

string or nil

Name of the group that owned the tribute territory before the war

oldOwnerLabel

string or nil

Label of the group that owned the tribute territory before the war

rm_gangs:server:onTurfWarStarted

AddEventHandler('rm_gangs:server:onTurfWarStarted', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.targetName)
    print(data.targetLabel)
    print(data.startDate)
    print(data.finishDate)
end)
KeyTypeDescription

id

number

Turf war id

initiatorName

string

Name of the group that started turf war

initiatorLabel

string

Label of the group that started turf war

targetName

string

Name of the group that owns the turf

targetLabel

string

Label of the group that owns the turf

startDate

number

Timestamp of the start date of turf war

finishDate

number

Timestamp of the end date of turf war

rm_gangs:server:onTurfWarFinished

AddEventHandler('rm_gangs:server:onTurfWarFinished', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.targetName)
    print(data.targetLabel)
    print(data.startDate)
    print(data.finishDate)
    print(data.initiatorNewLoyalty)
    print(data.initiatorPersonCount)
    print(data.targetNewLoyalty)
    print(data.targetPersonCount)
    print(data.successful)
end)
KeyTypeDescription

id

number

Turf war id

initiatorName

string

Name of the group that started turf war

initiatorLabel

string

Label of the group that started turf war

targetName

string

Name of the group that owns the turf

targetLabel

string

Label of the group that owns the turf

startDate

number

Timestamp of the start date of turf war

finishDate

number

Timestamp of the end date of turf war

initiatorNewLoyalty

number

New loyalty points for the group that started the turf war

initiatorPersonCount

number

Number of people alive at the end of the battle for the group that started the turf war

targetNewLoyalty

number

Turf owner's new loyalty points

targetPersonCount

number

Turf owner's number of people alive at the end of the turf war

successful

boolean

Winning status of the side that started the turf war

rm_gangs:server:onWarReplied

AddEventHandler('rm_gangs:server:onWarReplied', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.initiatorIdentifier)
    print(data.initiatorScore)
    print(data.targetName)
    print(data.targetLabel)
    print(data.targetIdentifier)
    print(data.targetScore)
    print(data.killGoal)
    print(data.wager)
    print(data.declareDate)
    print(data.acceptRejectDate)
    if data.accepted then
        print('accepted')
    else
        print('rejected')
    end
end)
KeyTypeDescription

id

number

War id

initiatorName

string

Name of the group that declared the war

initiatorLabel

string

Label of the group that started war

initiatorIdentifier

string

Identifier of the leader of the group that started the war

initiatorScore

number

Score of the group that started the war

targetName

string

Name of the group that is the target of the war declaration

targetLabel

string

Label of the group being declared war on

targetIdentifier

string

Identifier of the leader of the group declared at war

targetScore

number

Score of the declared war group

killGoal

number

The killing goal of war

wager

number

The amount of money set as a wager

accepted

boolean

Indicates whether the group declared upon has accepted the war

declareDate

number

Timestamp of the declare date of war

acceptRejectDate

number

Timestamp of the reply date of war

rm_gangs:server:onWarFinished

AddEventHandler('rm_gangs:server:onWarFinished', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.initiatorIdentifier)
    print(data.initiatorScore)
    print(data.initiatorNewLoyalty)
    print(data.targetName)
    print(data.targetLabel)
    print(data.targetIdentifier)
    print(data.targetScore)
    print(data.targetNewLoyalty)
    print(data.killGoal)
    print(data.wager)
    print(data.declareDate)
    print(data.acceptRejectDate)
    print(data.finishDate)
end)
KeyTypeDescription

id

number

War id

initiatorName

string

Name of the group that declared the war

initiatorLabel

string

Label of the group that started war

initiatorIdentifier

string

Identifier of the leader of the group that started the war

initiatorScore

number

Score of the group that started the war

initiatorNewLoyalty

number

New loyalty point of the group that started the war

targetName

string

Name of the group that is the target of the war declaration

targetLabel

string

Label of the group being declared war on

targetIdentifier

string

Identifier of the leader of the group declared at war

targetScore

number

Score of the declared war group

targetNewLoyalty

number

New loyalty point of the declared war group

killGoal

number

The killing goal of war

wager

number

The amount of money set as a wager

declareDate

number

Timestamp of the declare date of war

acceptRejectDate

number

Timestamp of the reply date of war

finishDate

number

Timestamp of the date the war ended

Client Events

rm_gangs:client:onTributeEventStarted

RegisterNetEvent('rm_gangs:client:onTributeEventStarted', function(data)
    print(data.name)
    print(data.label)
    print(data.finishDate)
    print(data.paymentAmount)
    print(data.captureDuration)
    print(data.coords)
    print(json.encode(data.territory, {indent = true}))
    print(data.oldOwnerName)
    print(data.oldOwnerLabel)
end)
KeyTypeDescription

name

string

Tribute zone name in cfg file

label

string

Tribute zone label in cfg file

finishDate

number

Timestamp of the event end date

paymentAmount

number

Money that can be received during the time interval set in the cfg file

captureDuration

number

Event duration in the cfg file

coords

vec4

Coordinate of the tribute npc in the cfg file

territory

table

Tribute territory data in cfg file

oldOwnerName

string or nil

Name of the group that owned the tribute territory before the war

oldOwnerLabel

string or nil

Label of the group that owned the tribute territory before the war

rm_gangs:client:onTributeEventFinished

RegisterNetEvent('rm_gangs:client:onTributeEventFinished', function(data)
    print(data.name)
    print(data.label)
    print(data.paymentAmount)
    print(data.captureDuration)
    print(data.coords)
    print(json.encode(data.territory, {indent = true}))
    print(data.ownerName)
    print(data.ownerLabel)
    print(data.captureDate)
    print(data.oldOwnerName)
    print(data.oldOwnerLabel)
end)
KeyTypeDescription

name

string

Tribute zone name in cfg file

label

string

Tribute zone label in cfg file

paymentAmount

number

Money that can be received during the time interval set in the cfg file

captureDuration

number

Event duration in the cfg file

coords

vec4

Coordinate of the tribute npc in the cfg file

territory

table

Tribute territory data in cfg file

ownerName

string or nil

Name of the new owner of the zone

ownerLabel

string or nil

Label of the new owner of the zone

captureDate

number or nil

Timestamp of the claim date

oldOwnerName

string or nil

Name of the group that owned the tribute territory before the war

oldOwnerLabel

string or nil

Label of the group that owned the tribute territory before the war

rm_gangs:client:onTurfWarStarted

RegisterNetEvent('rm_gangs:client:onTurfWarStarted', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.targetName)
    print(data.targetLabel)
    print(data.startDate)
    print(data.finishDate)
end)
KeyTypeDescription

id

number

Turf war id

initiatorName

string

Name of the group that started turf war

initiatorLabel

string

Label of the group that started turf war

targetName

string

Name of the group that owns the turf

targetLabel

string

Label of the group that owns the turf

startDate

number

Timestamp of the start date of turf war

finishDate

number

Timestamp of the end date of turf war

rm_gangs:client:onTurfWarFinished

RegisterNetEvent('rm_gangs:client:onTurfWarFinished', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.targetName)
    print(data.targetLabel)
    print(data.startDate)
    print(data.finishDate)
    print(data.initiatorNewLoyalty)
    print(data.initiatorPersonCount)
    print(data.targetNewLoyalty)
    print(data.targetPersonCount)
    print(data.successful)
end)
KeyTypeDescription

id

number

Turf war id

initiatorName

string

Name of the group that started turf war

initiatorLabel

string

Label of the group that started turf war

targetName

string

Name of the group that owns the turf

targetLabel

string

Label of the group that owns the turf

startDate

number

Timestamp of the start date of turf war

finishDate

number

Timestamp of the end date of turf war

initiatorNewLoyalty

number

New loyalty points for the group that started the turf war

initiatorPersonCount

number

Number of people alive at the end of the battle for the group that started the turf war

targetNewLoyalty

number

Turf owner's new loyalty points

targetPersonCount

number

Turf owner's number of people alive at the end of the turf war

successful

boolean

Winning status of the side that started the turf war

rm_gangs:client:onWarReplied

RegisterNetEvent('rm_gangs:client:onWarReplied', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.initiatorIdentifier)
    print(data.initiatorScore)
    print(data.targetName)
    print(data.targetLabel)
    print(data.targetIdentifier)
    print(data.targetScore)
    print(data.killGoal)
    print(data.wager)
    print(data.declareDate)
    print(data.acceptRejectDate)
    if data.accepted then
        print('accepted')
    else
        print('rejected')
    end
end)
KeyTypeDescription

id

number

War id

initiatorName

string

Name of the group that declared the war

initiatorLabel

string

Label of the group that started war

initiatorIdentifier

string

Identifier of the leader of the group that started the war

initiatorScore

number

Score of the group that started the war

targetName

string

Name of the group that is the target of the war declaration

targetLabel

string

Label of the group being declared war on

targetIdentifier

string

Identifier of the leader of the group declared at war

targetScore

number

Score of the declared war group

killGoal

number

The killing goal of war

wager

number

The amount of money set as a wager

accepted

boolean

Indicates whether the group declared upon has accepted the war

declareDate

number

Timestamp of the declare date of war

acceptRejectDate

number

Timestamp of the reply date of war

rm_gangs:client:onWarFinished

RegisterNetEvent('rm_gangs:client:onWarFinished', function(data)
    print(data.id)
    print(data.initiatorName)
    print(data.initiatorLabel)
    print(data.initiatorIdentifier)
    print(data.initiatorScore)
    print(data.initiatorNewLoyalty)
    print(data.targetName)
    print(data.targetLabel)
    print(data.targetIdentifier)
    print(data.targetScore)
    print(data.targetNewLoyalty)
    print(data.killGoal)
    print(data.wager)
    print(data.declareDate)
    print(data.acceptRejectDate)
    print(data.finishDate)
end)
KeyTypeDescription

id

number

War id

initiatorName

string

Name of the group that declared the war

initiatorLabel

string

Label of the group that started war

initiatorIdentifier

string

Identifier of the leader of the group that started the war

initiatorScore

number

Score of the group that started the war

initiatorNewLoyalty

number

New loyalty point of the group that started the war

targetName

string

Name of the group that is the target of the war declaration

targetLabel

string

Label of the group being declared war on

targetIdentifier

string

Identifier of the leader of the group declared at war

targetScore

number

Score of the declared war group

targetNewLoyalty

number

New loyalty point of the declared war group

killGoal

number

The killing goal of war

wager

number

The amount of money set as a wager

declareDate

number

Timestamp of the declare date of war

acceptRejectDate

number

Timestamp of the reply date of war

finishDate

number

Timestamp of the date the war ended

Exports

Server Exports

addLoyalty

exports.rm_gangs:addLoyalty(gangName --[[string]], amount --[[number]])

removeLoyalty

exports.rm_gangs:removeLoyalty(gangName --[[string]], amount --[[number]])

cancelTributeEvent

exports.rm_gangs:cancelTributeEvent(zoneName --[[string]])

Last updated