• Request an addon
    49 replies, posted
[QUOTE=Baby Weiner;45609784]Why are you using a for loop for this? All you need to do is strip the primary weapon then give a new one.[/QUOTE] I need to holster it as well -_-
A ULX command that runs record fix;stop in the console to fix invisible guns and players [lua]CATEGORY_NAME = "Fix" function ulx.fix(ply) ply:ConCommand("record fix") ply:ConCommand("stop") end local fix = ulx.command( CATEGORY_NAME, "ulx fix", ulx.fix, "!fix" ) fix:defaultAccess( ULib.ACCESS_USER ) fix:help( "Fix the invisible stuff!" )[/lua] Didn't work because concommand sucks but I think you need to use LocalPlayer and SendLua
[QUOTE=Baron von Hax;45609989]A ULX command that runs record fix;stop in the console to fix invisible guns and players [lua]CATEGORY_NAME = "Fix" function ulx.fix(ply) ply:RunConsoleCommand("record", "fix") ply:RunConsoleCommand("stop") end local fix = ulx.command( CATEGORY_NAME, "ulx fix", ulx.fix, "!fix" ) fix:defaultAccess( ULib.ACCESS_USER ) fix:help( "Fix the invisible stuff!" )[/lua] Didn't work because concommand sucks but I think you need to use LocalPlayer and SendLua[/QUOTE] try that
[QUOTE=Baron von Hax;45609989]A ULX command that runs record fix;stop in the console to fix invisible guns and players [lua]CATEGORY_NAME = "Fix" function ulx.fix(ply) ply:ConCommand("record fix") ply:ConCommand("stop") end local fix = ulx.command( CATEGORY_NAME, "ulx fix", ulx.fix, "!fix" ) fix:defaultAccess( ULib.ACCESS_USER ) fix:help( "Fix the invisible stuff!" )[/lua] Didn't work because concommand sucks but I think you need to use LocalPlayer and SendLua[/QUOTE] Would I make a new .lua file for this and if so where would I put it?
[QUOTE=Tomvdr;45608085]Why would you use a console command to run a function ? And why are you not checking if the player who typed !donatorfeatures is the same as LocalPlayer() ? [code] local function donator() -- Derma stuff end hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text ) if ply == LocalPlayer() then if ( text == "!donatorfeatures" ) donator() end end end ) [/code][/QUOTE] I just copy pasted the code he posted, and put it into the correct file path so that he could drag and drop, because he was having trouble even getting the code to run. Not my code.
[QUOTE=CallMePyro;45612287]I just copy pasted the code he posted, and put it into the correct file path so that he could drag and drop, because he was having trouble even getting the code to run. Not my code.[/QUOTE] Just use this as your code: [CODE]local function donator() -- Derma stuff end hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text ) if ( ply == LocalPlayer() && ( text == "!donatorfeatures" ) then donator() end end )[/CODE]
[QUOTE=JasonMan34;45612320]Just use this as your code: [CODE]local function donator() -- Derma stuff end hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text ) if ( ply == LocalPlayer() && ( text == "!donatorfeatures" ) then donator() end end )[/CODE][/QUOTE] I'm well aware as to how to make a chat command :) Just trying to help this guy get his code running so he can start figuring it out on his own. It's how you learn best, in my opinion.
[QUOTE=Ganoal;45612220]Would I make a new .lua file for this and if so where would I put it?[/QUOTE] addons/ulx/lua/ulx/modules/sh/fix.lua
I know I'm late to join in on all this 'excitement' but I will be willing to be a part of this considering I can never come up with stuff to make (I'm a very unimaginative person) :v: Also if we did end up setting up a github team it would be a good idea to have a unified coding style to make it easier to work as a team so we wouldn't end up with one person coding full out Lua style, one coding C style and one coding Josh 'Acecool' Moser style.
[QUOTE=JasonMan34;45609792]I need to holster it as well -_-[/QUOTE] There are two types of holstering. System 1 is to "holster" the weapon by changing to weapon_fists or other swep that acts as "none". System 2 is to remove all trace of a weapon out of the player hands. System 1 is the easiest to do because you just SelectWeapon to your base weapon.. System 2 requires you have a dummy-weapon that you give to the player, switch to, then remove from the player. Which are you looking to do? System 1 makes the most sense because you can have a weapon_fist that you can raise / lower your fists without needing to pull out a weapon... I have an example for System 2, and I'll have one for System 1 soon.
[QUOTE=ZombieWizzard;45614170]I know I'm late to join in on all this 'excitement' but I will be willing to be a part of this considering I can never come up with stuff to make (I'm a very unimaginative person) :v: Also if we did end up setting up a github team it would be a good idea to have a unified coding style to make it easier to work as a team so we wouldn't end up with one person coding full out Lua style, one coding C style and one coding Josh 'Acecool' Moser style.[/QUOTE] I think we all will agree that putting copyrights in comments and abusing underscores and semicolons should be included in our coding style.
[QUOTE=ZombieWizzard;45614170]I know I'm late to join in on all this 'excitement' but I will be willing to be a part of this considering I can never come up with stuff to make (I'm a very unimaginative person) :v: Also if we did end up setting up a github team it would be a good idea to have a unified coding style to make it easier to work as a team so we wouldn't end up with one person coding full out Lua style, one coding C style and one coding Josh 'Acecool' Moser style.[/QUOTE] Why not type up a document like this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_tutorial_quizzes/_coding_standards.lua.html[/url] for the Garry's Mod style. Since this is for requesting addons for GMod, it could make sense to code in the standard Garry's Mod / Garry Git Style because if something is requested that makes a lot of sense to be merged into GMod, there'd be no retyping it?
I am looking for someone that can update this: [url]http://www.garrysmod.org/downloads/?a=view&id=79121[/url] Or either this: [url]http://www.garrysmod.org/downloads/?a=view&id=75969[/url] Thanks!
[QUOTE=Acecool;45614468]Why not type up a document like this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_tutorial_quizzes/_coding_standards.lua.html[/url] for the Garry's Mod style. Since this is for requesting addons for GMod, it could make sense to code in the standard Garry's Mod / Garry Git Style because if something is requested that makes a lot of sense to be merged into GMod, there'd be no retyping it?[/QUOTE] But garrys coding sucks and I have my own style
Ill help out here. Its probably a bit late, but i have lots of experiance coding addons etc for deathrun and Darkrp.
Money for kills tool. i tried one that was part of RADAR but it didnt give money it gave coins and lagged WACs
[QUOTE=anknown;45619924]Money for kills tool. i tried one that was part of RADAR but it didnt give money it gave coins and lagged WACs[/QUOTE] Money as in DarkRP money? Mind being a little more descriptive?
[QUOTE=anknown;45619924]Money for kills tool. i tried one that was part of RADAR but it didnt give money it gave coins and lagged WACs[/QUOTE] On[URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexbdc5.html"] PlayerDeath[/URL] give some money using a console command to the Killer. Edit: Sorry, didnt mean to bump 2 days
[QUOTE=Exho;45643746]On[URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexbdc5.html"] PlayerDeath[/URL] give some money using a console command to the Killer. Edit: Sorry, didnt mean to bump 2 days[/QUOTE] Don't link the old wiki if there is an identical page on the [URL="http://wiki.garrysmod.com/page/GM/PlayerDeath"]new wiki[/URL]
Postresql module
Sorry, you need to Log In to post a reply to this thread.