Garry's Mod

Garry's Mod

评价数不足
Ability API | A simple ability addon for Garrys Mod
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 快乐, 角色扮演
文件大小
发表于
5.317 KB
2017 年 11 月 26 日 下午 12:49
1 项改动说明 ( 查看 )

订阅以下载
Ability API | A simple ability addon for Garrys Mod

描述
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 条留言
8ball 2018 年 8 月 10 日 上午 1:36 
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 2018 年 2 月 11 日 上午 9:18 
maybe can you do a video where you showing how to do that all pls
⊰{TFA}⊱KZ Mantiss 2018 年 1 月 3 日 下午 6:51 
@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?