FiGo Posted November 11, 2017 Posted November 11, 2017 function gangChatStaff(player, cmd, ...) local gang = getPlayerGang(player) if (isPlayerMuted(player)) then outputChatBox("You are muted!", plr, 255, 0, 0) return end if (not canPlayerDoActionInSquad(player, "GroupStaffChat")) then return end if (not gang) then return end if (not ...) then return end local message = table.concat({...}, " ") local r, g, b = getGangChatColor(gang) local message2 = "(SSC) "..getPlayerName(player)..": #FFFFFF"..message for k, v in pairs(getGangMembers(gang)) do if (canPlayerDoActionInSquad(k, "GroupStaffChat")) then outputChatBox(message2.."", k, r, g, b, true) exports.CIPadmin:writePlayerLog(player, "SSC (Squad) "..getPlayerName(player)..": ".. table.concat({...}, " "), "squads") end end exports.CIPadmin:outputOnlineStaff("SSC ("..gang..") "..getPlayerName(player)..": ".. table.concat({...}, " "), 255, 255, 255) end addCommandHandler("ssc", gangChatStaff) function editGroupMOTD(player, cmd, ...) local gang = getPlayerGang(player) if (not canPlayerDoActionInGroup(player, "gmotd")) then return end if (not gang) then return end if (not ...) then return end local message = table.concat({...}, " ") local r, g, b = getGangChatColor(gang) local message2 = "(GMOTD) "..getPlayerName(player).." has set the GMOTD to: #FFFFFF"..message if (canPlayerDoActionInGroup(player, "smotd")) then local accountGmotd = getAccount("intercore") setAccountData(accountGmotd, "groupMOTD"..gang, getPlayerName(player)..": "..message) messageGang(gang, message2) exports.CIPtexts:output("You successfully changed group MOTD", player, 0, 255, 0, false) end end addCommandHandler("smotd", editGroupMOTD) function showGroupMOTD() local gang = getPlayerGang(source) local account = getAccount("intercore") if (not gang) then return end local message = getAccountData(account, "groupMOTD"..gang) local message2 = "(GMOTD) "..message local r, g, b = getGangChatColor(gang) outputChatBox(message2, source, r, g, b) end addEventHandler("onPlayerLogin", getRootElement(), showGroupMOTD) Anyone plz fix me this
FiGo Posted November 11, 2017 Author Posted November 11, 2017 I need them work for squad so anyone plz help me
iMr.WiFi..! Posted November 11, 2017 Posted November 11, 2017 2 hours ago, FiGo said: function gangChatStaff(player, cmd, ...) local gang = getPlayerGang(player) if (isPlayerMuted(player)) then outputChatBox("You are muted!", plr, 255, 0, 0) return end if (not canPlayerDoActionInSquad(player, "GroupStaffChat")) then return end if (not gang) then return end if (not ...) then return end local message = table.concat({...}, " ") local r, g, b = getGangChatColor(gang) local message2 = "(SSC) "..getPlayerName(player)..": #FFFFFF"..message for k, v in pairs(getGangMembers(gang)) do if (canPlayerDoActionInSquad(k, "GroupStaffChat")) then outputChatBox(message2.."", k, r, g, b, true) exports.CIPadmin:writePlayerLog(player, "SSC (Squad) "..getPlayerName(player)..": ".. table.concat({...}, " "), "squads") end end exports.CIPadmin:outputOnlineStaff("SSC ("..gang..") "..getPlayerName(player)..": ".. table.concat({...}, " "), 255, 255, 255) end addCommandHandler("ssc", gangChatStaff) function editGroupMOTD(player, cmd, ...) local gang = getPlayerGang(player) if (not canPlayerDoActionInGroup(player, "gmotd")) then return end if (not gang) then return end if (not ...) then return end local message = table.concat({...}, " ") local r, g, b = getGangChatColor(gang) local message2 = "(GMOTD) "..getPlayerName(player).." has set the GMOTD to: #FFFFFF"..message if (canPlayerDoActionInGroup(player, "smotd")) then local accountGmotd = getAccount("intercore") setAccountData(accountGmotd, "groupMOTD"..gang, getPlayerName(player)..": "..message) messageGang(gang, message2) exports.CIPtexts:output("You successfully changed group MOTD", player, 0, 255, 0, false) end end addCommandHandler("smotd", editGroupMOTD) function showGroupMOTD() local gang = getPlayerGang(source) local account = getAccount("intercore") if (not gang) then return end local message = getAccountData(account, "groupMOTD"..gang) local message2 = "(GMOTD) "..message local r, g, b = getGangChatColor(gang) outputChatBox(message2, source, r, g, b) end addEventHandler("onPlayerLogin", getRootElement(), showGroupMOTD) Anyone plz fix me this Please Use lua tag , and let us to see debug ..
FiGo Posted November 11, 2017 Author Posted November 11, 2017 Bro there is no bug but i donot know why it donot work i am making it for squad so can you fix it
idarrr Posted November 15, 2017 Posted November 15, 2017 I don't think anyone can help you without debug or specific information. There is also exported function, and the problem may there. Please read this: And this: And try this to debug your code:
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