Garry's Mod

[CLOSED] GARRYS MOD SERVER SETUP FREE

Submitted by url, , Thread ID: 50847

Thread Closed

RE: [CLOSED] GARRYS MOD SERVER SETUP FREE

#16
I finally fixed my lines of code.
Previously it would look like:
Code:
gag:AddOption( "Gag", function() RunConsoleCommand( "_FAdmin", "Voicemute", self.Player:UserID() ) end ):SetIcon( "icon16/sound_delete.png" )
Although now, I have it fixed to look like:
Code:
gag:AddOption( "Gag", function() if not (IsValid(self.Player) or self.Player:IsValid()) then return end  
LocalPlayer():ConCommand("ulx gag \"".. self.Player:Nick() .. "\"" ) end ):SetIcon( "icon16/email_delete.png" )
It took a lot of time but the similar lines can be used on any of the functions. Just make sure to replace all the "gag"s with whatever function you want.
This is for anyone that has a similar issue that I did.

Users browsing this thread: 2 Guest(s)