Garry's Mod

Garry's Mod

Not enough ratings
Ability API | A simple ability addon for Garrys Mod
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay
File Size
Posted
5.317 KB
26 Nov, 2017 @ 12:49pm
1 Change Note ( view )

Subscribe to download
Ability API | A simple ability addon for Garrys Mod

Description
This addon was mainly built for server owners / people who have wanted to make addons where you can have abilities.

This addon comes with some basic premade ability templates, just so you can get the gyst on how this addon works (this will be located inside of default_abilities.lua)

This addon comes with a clientsided method of setting you're own abilities or choosing individual abilities for the use of fun, allow any addon to use this method to create more abilities so the user can enjoy.

The clientside has a binding menu that lets you bind you're desired keys to a specific ability slot, as well it comes with a nice hud that if deleted correctly, can be completely removed from you're server so gamemode / other use.

To run specific abilities server sided, you use;
ply:Ability( num )
Num can variate from 1-4 (you can add more ability slots as the code is pretty simpley set out)

Setting a players ability is simple as well, you can either use the console command Ability1,Ability2,Ability3,Ability4 with the argument of a string (the ability you created, this can be used for creating / designing characters for you gamemode and setting their abilities, the alternative is ply:SetNWString( "Ability1", ability name ) like above, just for setting abilities server sided.

You can use this addon for any project; personal, server wide, community based, to be honest I have no care in the world what you do with this addon AS LONG as you're community knows who originally created it.

Anyway! Have fun.
3 Comments
8ball 10 Aug, 2018 @ 1:36am 
The addon just doesn't work. The HUD appears and all, but hte abilities don't work when I do the bind I have them set to. I tried to run the command to use an ability directly from the console, but all I got was this being spammed at me:

[Ability API] lua/autorun/cl_abilities.lua:105: bad argument #3 to 'SetDrawColor' (number expected, got no value)
1. SetDrawColor - [C]:-1
2. v - lua/autorun/cl_abilities.lua:105
3. unknown - lua/includes/modules/hook.lua:84
Ikit Claw 11 Feb, 2018 @ 9:18am 
maybe can you do a video where you showing how to do that all pls
⊰{TFA}⊱KZ Mantiss 3 Jan, 2018 @ 6:51pm 
@RetroMystic saying stuff like that isnt helping.
@Superior Jacob I suggest posting screenshots of how it looks in-game. Phrases that ALOT of people on the workshop follow: "No Pics, no Clicks; No description, no Subscription". Its great that you said how to configure the mod, but what do the abilities themselves do?