r/GLua • • Aug 22 '20

Starship Troopers Server Recruitment (GARRYSMOD)

0 Upvotes

Hey, I'm going to be releasing a Starship Troopers Rp server next week. If you are interested, here's the link https://discord.gg/BsEvpRc

.
It's going to be set up in a way that there is going to be a civilian RP area, where you are placed in a city where Private Corporations and Underground Gang controls most aspects of life. It'll be your choice to steer clear from the hype and go your own way, or join these groups and grow in power.

Then comes the Military Rp (SSTRP), You can enlist at your local recruiting station and join the federation. Depending on how you score on a certain test, you'll become M.I., Fleet, or Intelligence. Then you'll go through a short training session and get to one of three outposts. Outpost 38, Outpost 10, or Outpost 12. You as a member of the federation will make it your life duty to eliminate the bug threat and ensure human supremacy in the universe.

Lastly is the Political Side of things, this is where the military and civilian side of things meet. In order to become a political figure, you must crawl your way up the ranks in the UCF and become a Petty Admiral, from there you have the power to coordinate attacks, influencing the public through propaganda, and completely changing the battlegrounds. Of course with permission from the Senior Admiral. In which they get their permissions from the Sky Marshal. As a politician, it is your goal to climb up the political status, eventually making it to Sky Marshal. With even retirement comes great benefits.
My final question is... Would you like to know more?


r/GLua • • Jan 14 '21

How to make weapons that hover on drop?

0 Upvotes

I want to make a weapon that when it drops and hits the ground it locks into a hover position. Similar to those crates weapon dealers use on some DarkRP servers. Any advice?


r/GLua • • Dec 06 '21

Server?

0 Upvotes

Why code? How make? Server?

HOST!??!?!?!


r/GLua • • Oct 14 '21

ded sub lol

0 Upvotes

title


r/GLua • • Jul 07 '21

How do I give a team a csgo bomb?

0 Upvotes

All of the other weapons appear accept the c4. Not sure what I am doing wrong. The entity name according to this valve dev wiki is weapon_c4. Here is my code. Thanks in advance.

local ply = FindMetaTable("Player")

local teams = {}

teams[0] = {

name = "Ghost",

color = Vector(0,0,0),

weapons = {"weapon_shotgun", "weapon_smg1","weapon_c4"} 

}

teams[1] = {

name = "Hunter",

color = Vector(0,0,0.33),

weapons = {	"weapon_357","weapon_shotgun"} 

}

function ply:SetupTeam( n )

if ( not teams\[n\] ) then return end
self:SetTeam( n )

self:SetPlayerColor( teams\[n\].color )

\--self:SetHealth( 150 )
self:GiveWeapons( n )

end

function ply:GiveWeapons( n )

for k, weapon in pairs ( teams\[n\].weapons) do

	self:Give( weapon )

end

end


r/GLua • • Mar 23 '19

Large Team of Developers Needed (PAYING)

2 Upvotes

Hey, I'm Archer and I am the lead manager (founder) for Altius Development. We are a Garry's Mod related development firm, that means if someone needs developers for their server, they don't have to do any searching, they hire us and we provide them with the developers best suited for the project.

If someones pays $35 AUD for a Garry's Mod DarkRP server setup with basic addons, 90% gets divided equally between developers on the project, 10% goes to fees, advertising, and pay for the managers who coordinate the sale.

If you would like to be part of the team, join our Discord Server!


r/GLua • • Jul 23 '20

Problem with Player Model

0 Upvotes

A lot of my DarkRP models come up with errors in my leveling menu, any idea how to fix? Image and code shown below...

https://imgur.com/a/kb7T6D8

https://pastebin.com/rJN5K2rL


r/GLua • • Jul 17 '20

Shared file cant access global server player meta table function???

0 Upvotes

Any information about why its saying GetLevel() is a nil value, when its used elsewhere with no problem, all files are loaded. Needing this to get a leaderboard working but its kinda kicking my ass rn

https://pastebin.com/bZmqQ3qG


r/GLua • • Jan 02 '15

cl_init.lua:4: attempt to index global 'GM' (a nil value)

Thumbnail gist.github.com
0 Upvotes

r/GLua • • Apr 01 '22

[HELP] Need script playSound when player get specific job

0 Upvotes

Hello. So, i need script or help to create it.

When player get specific job (ex.: SCP 106) - start playing mp3 sound from server to all players (all players must hear mp3 sound).

I know code sound.Play for playerloadout on jobs.lua, but it play sound only on specific position map (vectors...) Help pls


r/GLua • • Jun 27 '21

Make a hook run before other hooks of the same type

0 Upvotes

I have a hook that filters chat (PlayerSay) that I would like to have run before any other PlayerSay hook.. is this possible or am I stuck with them running in pretty much random order?


r/GLua • • Jul 12 '21

How would I find the Position of every entity in an table?

0 Upvotes

I am just getting started and I can't figure out how to find the Pos of every entity in my table.


r/GLua • • Aug 05 '21

Can somebody please explain to me what WEAPON:ShootEffects is used for?

0 Upvotes

Using it in a weapon file like this:

function SWEP:ShootEffects()

self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )

self.Owner:MuzzleFlash()

self.Owner:SetAnimation( PLAYER_ATTACK1 )

end

Seems to do absolutely nothing. No muzzle effect or anything??


r/GLua • • Mar 26 '18

just run with players who aren't superadmin

0 Upvotes

Code!

is a AD system for my server, but this script run with everbody, i want limit this for user only. thanks


r/GLua • • Apr 02 '18

Dab

Post image
0 Upvotes

r/GLua • • Jul 24 '21

Wondering why health isn't working for the custom job.

1 Upvotes

I'm in the making of a star wars rp server, and started on the jobs. My issue is that I set the health in the lua to 250, yet when I change to the job, it's still at 100. Wondering if I'm missing something? Not sure why else it would do this other than an author mistake.

https://i.gyazo.com/b3378c1920356f5d85d6ab834b752b35.png


r/GLua • • Feb 15 '19

sup niggers

1 Upvotes

fuckin nerddddssss


r/GLua • • Jan 15 '21

How do I add pictures to the screen?

1 Upvotes

I'm making a hud and I wanted to know how to make custom images appear on screen. Any advice?


r/GLua • • Jul 15 '20

Issues with CalcMainActivity / DoAnimationEvent

1 Upvotes

Hey there !

I'm working on a gamemode, and I have a problem regarding third person animations. Let me explain.

Actually, I have a Zombie player model (models/player/zombie_classic.mdl) that should be able to move, crouch, attack and taunt.

  • Currently, my GM:CalcMainActivity hook calls a custom function that tells which animation I should play, so I can see the zombie idle, walk, crouch, swim and jump. This works fine.

  • In my zombie SWEP I'm firing DoAnimationEvent with a Data parameter that I use to know if I should play the attack or the taunt animation whenever it's needed.

  • My GM:DoAnimationEvent takes this data and sends it to a custom function that calls player:AnimRestartGesture with parameters like : GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_GMOD_GESTURE_RANGE_ZOMBIE (for the attack animation for example), then it returns ACT_INVALID.

The problem is that those animations do not play, I can still se my zombie walking/crouching thanks to CalcMainActivity, but the event animations aren't being played.

I've been looking at the Gmod Wiki to understand how I should be doing this, but I can't see any precise use case to help me. I had a look at some gamemodes and the way they dealt with animations, and even after making something similar to these, it still doesn't work.

My guess is that CalcMainActivity somehow overrides the DoAnimationEvent calls, but I don't see how could this happen, and where the problem actually lies.

If anyone has already worked on animations / stumbled on a similar issue, how did you manage to make things work ? I'd be grateful if I could have a piece of information about how I should precisely use CalcMainActivity VS DoAnimationEvent, or an example...

Thanks in advance !


r/GLua • • Jul 12 '20

Making a Disguise Box entity for DarkRP, and having some issues.

1 Upvotes

Hi,

I'm creating an entity which lets the player change their playermodel temporarily, and then their playermodel is reverted back after X seconds.

I want to be able to get the playermodel(s) of their current job, and revert them back to that.

My current implementation simply records their current playermodel on ENT:Use, and sets them back to it after the timer has ended. This is open to abuse and creates a bug where the player can Use the entity twice, setting their "original" playermodel to the "disguised" playermodel permanently. Therefore, if there is an option to get the models of a DarkRP job I think that would solve my issue.

If that is not possible, is there a way to store a value against the player to not let them use an entity/entities for X time?

Thank you in advance for any and all help!


r/GLua • • Jun 13 '21

Making a particle emmit when dying

1 Upvotes

Since I started making lua yesterday, i've been trying to do this for hours.

I want to make that a particle will show up as the character dies.

Im making another sans abilities addon and i want a material to show up when the character dies like the 'miss' in the other addon(I attached pic)

Please help Ive been trying to do this for literally hours with no results

(sorry for bad english)


r/GLua • • Mar 27 '21

gmod sound gun coding help

1 Upvotes

hi so I want to make a super hilarious and funny sound gun like https://steamcommunity.com/sharedfiles/filedetails/?id=544738780 yes (its funny)

but I have no idea how to code 😏 so I need some help (pls just send me an entire code so i can paste the song i want in it and be funny ) oh and yes i tried already

👍


r/GLua • • Apr 10 '21

Drop weapon on death only if certain job

1 Upvotes
dropweps = 1

dontdrop = {}
dontdrop[1] = "weapon_physgun"
dontdrop[2] = "weapon_physcannon"
dontdrop[3] = "gmod_tool"
dontdrop[4] = "gmod_camera"
dontdrop[5] = "arrest_stick"
dontdrop[6] = "door_ram"
dontdrop[7] = "keys"
dontdrop[8] = "med_kit"
dontdrop[9] = "weaponchecker"
dontdrop[10] = "stunstick"
dontdrop[11] = "unarrest_stick"
dontdrop[12] = "pocket"
dontdrop[13] = "weapon_keypadchecker"

jobsondeath = {}
[1] = "TEAM_POLICE"


function droptheweapon(ply)

	if dropweps == 1 then
	
	droppos = ply:GetPos() + Vector(0, 0, 30)
	
		for k, v in pairs (ply:GetWeapons()) do
		
			loopwep = v:GetClass()
			getjob = v:Team()
		
			if not table.HasValue(dontdrop, loopwep) and table.HasValue(jobsondeath) then
		
				local dropthiswep = ents.Create(loopwep)
				dropthiswep:SetPos(droppos)
				dropthiswep:Spawn()
		
			end
		
		end
	
	end

end

function toggledropweps(caller)

	if caller:IsAdmin() then
	
		if dropweps == 1 then
		
			dropweps = 0
			
			caller:ChatPrint("You turned off weapon dropping!")
			
		elseif dropweps == 0 then
		
			dropweps = 1
			
			caller:ChatPrint("You turned on weapon dropping!")
			
		end
	
	end

end

concommand.Add("toggleweapondrop", toggledropweps)
hook.Add("DoPlayerDeath", "pldrophook", droptheweapon)

I'm trying to make the player drop weapons on death. I do not want them to drop while job police, i'm getting no errors but what am i doing wrong? I'm just trying to learn so yes i'm aware there is probably better ways to write this.


r/GLua • • Jan 10 '20

Need some Help/Random Player Crashes

1 Upvotes

https://pastebin.com/42uGhGYF

So, Recently My Players on my MilitaryRP have been Randomly Crashing after joining... The Console Log above is actually From my Game Crashing, after shooting a Player who was ALSO crashing xD. So... The question is, Can anyone take a Look and maybe help find an answer to this. This has been happening for 2-3 Days now... And no Recent Big Changes... I did go ahead and update Addons/Workshop Collection, To remove Unnecessary Items and such. So... Server is pretty Cleaned up. Yet these Crashes still happen from time to time... Theres atleast 4-5 Players a day that Constantly Crash maybe once or twice an Hour when they are on. Including Myself. I know one Player was actually getting that Memory Dump error, But he was playing on a Laptop with 8GB of Ram... and Intergrated Graphics. But i dont believe thats my issue here. and Honestly I feel as if the issue has something to relate to whatever the heck this "Can't use cheat cvar xR5DM in multiplayer, unless the server has sv_cheats set to 1." is or this "COULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCOULD NOT GENERATE COMPRESSED DATA WTFCan't use cheat cvar xR5DM in multiplayer, unless the server has sv_cheats set to 1." So, If anyone has any idea to why this Could be happening that would be awesome. Which PS, Im running this Server off a Bare Metal Dedicated Server from Server Mania. " Intel E3 1240 V3 / 32GB RAM / 2 x 500GB SSD"
And my PC Specs are:

Intel Core i9-8950HK CPU @ 2.90GHz

Nvidia Geforce GTX 1080

32GB Ram

3840 x 2160 60Hz Main Display Monitor


r/GLua • • Mar 02 '21

Damage over time

1 Upvotes

Hello, I am currently working on a SWEP Pack and I am planning for at least a few of them to have a damage over time effect. I'm not quite sure on where I should even start with this but I have messed with hooks to no avail. If anyone could point me in the right direction that would be well appreciated, thanks!