General > Developers Corner

Help with a lua

(1/3) > >>

killforfun:
What it should do is when i type !minge (players name) in chat it should add that person to the ulx group minge
This will not work and i cant find it to enable it for superadmins


made by JusticeInACan


--- Code: ---// save this as minge.lua in the folder garrysmod/garrysmod/addons/ulx/lua/ulx/modules/sh/ and give the ulx minge right to yourself

local CATEGORY_NAME = "User Management"

local function ulx.mingeuser(ply,target)
ulx.adduser(ply,target,"minge")
end

local mingeuser = ulx.command( CATEGORY_NAME, "ulx minge", ulx.mingeuser )
mingeuser:addParam{ type=ULib.cmds.PlayerArg }
mingeuser:defaultAccess( ULib.ACCESS_SUPERADMIN )
mingeuser:help("Turn a user into a minge." )
--- End code ---


Megiddo:
Give us more details than "it doesn't work". Are there errors in the client or server console?

killforfun:
this is all that's in my console from start up


--- Code: ---memode 'sandbox' derived from 'base'
--- Missing Vgui material texturemissing
Sending 1339 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Scanning for downloaded fonts..
Reloading Particles..
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/spray1/spray1_streak
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/spray1/spray1_streak
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1/vistasmokev1_fire2
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1/vistasmokev1_fire2
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/spray1/spray1_addself
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/spray1/spray1_addself
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_fog_add
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_fog_add
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_fog_add
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_fog_add
Client "[?l?l?]kill for fun" spawned in server (74.182.177.26:58717)<STEAM_0:0:15674006>.
Welcome to Spektrum|build|24/7| ! We're playing gm_construct.
[UTime]Welcome back [?l?l?]kill for fun, you last played on this server 06/16/11 14:36:55
Physgun build mode is available on this server
PlayX DEBUG: JW URL set
PlayX DEBUG: Host URL set
[ThreeD] Starting...
PlayX DEBUG: Providers list received
ULX version <SVN> revision 14 loaded.
RunConsoleCommand blocked - sent before player spawned (ZLib_Installed)

///////////////////////////////////////
//  ULX GUI -- Made by Stickly Man!  //
///////////////////////////////////////
// Loading GUI Modules...            //
//   bans.lua                        //
//   commands.lua                    //
//   groups.lua                      //
//   maps.lua                        //
//   settings.lua                    //
// Loading Setting Modules...        //
//   client.lua                      //
//   cl_apromote.lua                 //
//   server.lua                      //
// Loading Gamemode Module(s)...     //
//   sandbox.lua                     //
// Modules Loaded!                   //
///////////////////////////////////////

Redownloading all lightmaps
Error Vertex File for 'Holograms/plane.mdl' checksum 647644133 should be -1495644899
RunConsoleCommand blocked - sent before player spawned (ZLib_Installed)
Unknown command: resize_allow
RunConsoleCommand blocked - sent before player spawned (ZLib_Installed)
I
--- End code ---

and nun of it seems to be a error

Megiddo:
I don't see you trying to use the command in there, and I'm assuming this output is from your client.

Also, where are you putting this file?

killforfun:
I'm saving it  as minge.lua in the folder garrysmod/garrysmod/addons/ulx/lua/ulx/modules/sh/
in my server files
also a had typo on the information above

 it should at that person to the ulx group minge
"should say"
 it should add* that person to the ulx group minge

Navigation

[0] Message Index

[#] Next page

Go to full version