CFC-Servers / CFC-Servers/cfc_lib
Implement these functions, pls
- Dominant language
- Lua
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
General functions
- [x] 1. `generateCFCHook(string hookname)`, returns the generated hookname in CFC format
- [x] 2. `isValidPlayer(player ply)`, returns a boolean
- [x] 3. `alertPlayer(player ply, string addon, string message)`, alerts a player via `ChatPrint`, including a generated prefix that tells the player which CFC addon it came from
Pvp Functions
- [x] 1. `playerIsInPvp()`, returns a `bool`
- [x] 2. `playerIsInBuild()`, returns a `bool`
- [x] 3. `getPlayersInPvp()`, returns a `table` of `player` objects representing players in PvP (empty table if none)
- [x] 4. `getPlayersInBuild()`, returns a `table` of `player` objects representing players in Build (empty table if none)
- [ ] 4a. BONUS: Remove hook names with underscores from other projects
- [ ] 5. `playerHasSpawnProtection(player ply)`, returns a `bool`
Faction functions
- [ ] 1. `getFactionForPlayer(player ply)`, returns a `table` `{id = faction ID, name = Faction name, rank = Faction Rank}`, (empty table if none)
- [ ] 2. `getPlayersInFaction(string factionName)`, returns a `table` of `player` objects in said faction
- [ ] 3. `getPlayersInFaction(number factionID)`, returns a `table` of `player` objects in said faction
- [ ] 4. `getAllFactions()`, returns all factions in a `table` of entries similar to point 1
- [ ] 5. `getOnlineFactioneers()`, returns all online `player`s that are associated with PvpF
Please add to these if you think of something!
P.S. CFCLib is a global table, and all functions are accessed as such:
`CFCLib.generateCFCHook("my hook")`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.