Lopes Posted June 21, 2017 Share Posted June 21, 2017 (edited) 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 Edited June 21, 2017 by Lopes Link to comment
Enargy, Posted June 21, 2017 Share Posted June 21, 2017 You need the group's resource active. Link to comment
Lopes Posted June 22, 2017 Author Share Posted June 22, 2017 Resource Group is Active, Error Occurs When capture turf. It is are using The Same Color For All Groups ........ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now