Erro Code: call: failed to call 'group:getGroupColor' [string "?"]
function captureTurf(group, element)
if (group and element) then
setRadarAreaFlashing(radar[element], false)
if (capture[group] and isTimer(capture[group])) then
killTimer(capture[group])
end
if (isTimer(timer[group])) then
killTimer(timer[group])
end
local count = 0
for index, ent in pairs(getElementsByType("player")) do
local g2 = exports.group:getPlayerGroup(ent)
if (g2 and g2 == group) then
if (isElementWithinColShape(ent, element)) then
if (isPedInVehicle(ent)) then return end
local count = count + 1
local countMoney = 300 * count
local final = 3500 + countMoney
local final = math.floor(final)
outputChatBox("Parabéns Você Dominou Esse Territorio e Ganhou"..final, ent, 0, 245, 185)
exports.CSFaccounts:GPM(ent, final, "CSFturfs captured a turf")
end
local r, g, b = exports.group:getGroupColor(group)
setRadarAreaColor(radar[element], r or 0, g or 255, b or 0, 150)
outputChatBox("Seu Grupo Dominou Territorio Com Sucesso "..turfName[element], ent, r, g, b)
turfOwner[element] = group
triggerClientEvent(ent, "CSFturfs.removeDrawing", ent)
end
end
end
end