• Speed Increase Boots
    6 replies, posted
Hi. I was wondering if someone knew how to make a passive boots that increase speed by 30%. Please Help. Thanks, Tobias.
I know. @Edit: Anyways, I wanted to reply quickly to this. The thing is that I don't see a point of this thread. Are you making a request, or asking for someone to teach you how to make entities or what ? Because if you are looking for functions that increase speed then: [url]http://wiki.garrysmod.com/page/Player/SetRunSpeed[/url]
I just don't know how to make passive items. I was wondering if someone could help me or give me a code for them. I would very much apericate it. [editline]14th May 2013[/editline] I wouldn't mind paying though.
1st of all. This looks to me like a plain "Make it for me" thread. 2nd of all. [url]http://facepunch.com/showthread.php?t=1269027[/url] This is the place to make such requests And finally. What's so hard about making entity which OnUse does Activator:SetRunSpeed(num) ?
As in passive what do you mean? Do you wish to spawn them as an entity, press E on them and they stay until you leave the server? Once I get an answer I'll quickly make it for you and post the code.
I mean, when you buy then you must be traitor or detective, the second you buy run they equip until you die. They increase you speed by %30 automatically. It is passive use so you it doesn't take up any weapon slots.
From equip_items_shd.lua [lua] -- This table is used by the client to show items in the equipment menu, and by -- the server to check if a certain role is allowed to buy a certain item. -- If you have custom items you want to add, consider using a separate lua -- script that uses table.insert to add an entry to this table. This method -- means you won't have to add your code back in after every TTT update. Just -- make sure the script is also run on the client. -- -- For example: -- table.insert(EquipmentItems[ROLE_DETECTIVE], { id = EQUIP_ARMOR, ... }) -- -- Note that for existing items you can just do: -- table.insert(EquipmentItems[ROLE_DETECTIVE], GetEquipmentItem(ROLE_TRAITOR, EQUIP_ARMOR)) -- Special equipment bitflags. Every unique piece of equipment needs its own -- id. The number should increase by a factor of two for every item (ie. ids -- should be powers of two). So if you were to add five more pieces of -- equipment, they should have the following ids: 8, 16, 32, 64, 128... EQUIP_NONE = 0 EQUIP_ARMOR = 1 EQUIP_RADAR = 2 EQUIP_DISGUISE = 4 -- Icon doesn't have to be in this dir, but all default ones are in here local mat_dir = "VGUI/ttt/" -- Stick to around 35 characters per description line, and add a "\n" where you -- want a new line to start. EquipmentItems = { [ROLE_DETECTIVE] = { -- body armor { id = EQUIP_ARMOR, loadout = true, -- default equipment for detectives type = "item_passive", material = mat_dir .. "icon_armor", name = "item_armor", desc = "item_armor_desc" }, -- radar { id = EQUIP_RADAR, type = "item_active", material = mat_dir .. "icon_radar", name = "item_radar", desc = "item_radar_desc" } -- The default TTT equipment uses the language system to allow -- translation. Below is an example of how the type, name and desc fields -- would look with explicit non-localized text (which is probably what you -- want when modding). -- { id = EQUIP_ARMOR, -- loadout = true, -- default equipment for detectives -- type = "Passive effect item", -- material = mat_dir .. "icon_armor", -- name = "Body Armor", -- desc = "Reduces bullet damage by 30% when\nyou get hit." -- }, }; [ROLE_TRAITOR] = { -- body armor { id = EQUIP_ARMOR, type = "item_passive", material = mat_dir .. "icon_armor", name = "item_armor", desc = "item_armor_desc" }, -- radar { id = EQUIP_RADAR, type = "item_active", material = mat_dir .. "icon_radar", name = "item_radar", desc = "item_radar_desc" }, -- disguiser { id = EQUIP_DISGUISE, type = "item_active", material = mat_dir .. "icon_disguise", name = "item_disg", desc = "item_disg_desc" } }; }; -- Search if an item is in the equipment table of a given role, and return it if -- it exists, else return nil. function GetEquipmentItem(role, id) local tbl = EquipmentItems[role] if not tbl then return end for k, v in pairs(tbl) do if v and v.id == id then return v end end end[/lua] If you still don't know what to do after reading the comments, either learn lua or use [url=http://facepunch.com/showthread.php?t=1269027]this thread[/url]
Sorry, you need to Log In to post a reply to this thread.