Recent Posts

Pages: 1 2 [3] 4 5 ... 10
Off-Topic / Re: Creation of a customized command - help
« Last post by JamminR on December 15, 2020, 07:24:15 PM »
You could look at the tempadd code and modify to your need.
Off-Topic / Creation of a customized command - help
« Last post by JN Pudding on December 15, 2020, 05:07:23 PM »
I would like to create a command that gives a certain position for a certain time and that is also a single use (get only once)

can anybody help me?
Suggestions / Re: adding or suggesting a reconnect command please help
« Last post by iViscosity on December 15, 2020, 12:32:03 AM »
I understand this is super old, but for anyone who finds this: https://github.com/iViscosity/More-ULX-Commands/blob/master/lua/ulx/modules/sh/moreulx.lua#L392

All you have to do is send the 'retry' command to someone.
General Chat & Help and Support / Re: Capturing String Argument (ULX Command Hook)
« Last post by JamminR on December 08, 2020, 07:32:21 PM »
'calling_ply' is always passed without the function needing to add it as a parameter - therefore, you're passing calling_ply twice to the function.
Basically, your_function(calling_ply, discord) becomes your_function(calling_ply, discord=calling_ply) because of this line.
Code: [Select]
linkdiscord:addParam{ type=ULib.cmds.CallingPlayerArg } -- First param to the function is the player running the command
That's the second parameter, not the first.
ulx.command already passes calling_ply as first.

Quick reference is the ulx map command. Calling_ply is called, then we add string map name as second param.
General Chat & Help and Support / Capturing String Argument (ULX Command Hook)
« Last post by Fobro879 on December 08, 2020, 12:25:10 PM »
Okay, so I am making a discord-gmod synchronization addon with MySQL. I have literally everything working except for one ULX parameter hook

So, here is the code that matters:

Code: [Select]
--Inroduces the function
function ulx.linkdiscord( calling_ply, discord )

--Sanitization module
function input_laundry(source)
source.gsub(source, ";", "ILLEGAL") -- sanitizes ; kill value for SQL
source.gsub(source, '"', "ILLEGAL") -- sanitizes general " for both
source.gsub(source, "'", "ILLEGAL") -- sanitizes general ' for both

--Info grab
local player_ulx_group = calling_ply:GetUserGroup() --grabs player ulx grouop (string v)
local player_playerid = tostring(calling_ply); input_laundry(player_playerid);  -- sanitized username input
local player_discordid = tostring(discord); input_laundry(player_discordid); -- sanitized discordID input
local player_steam_id = calling_ply:SteamID() --grabs steam ID
local player_verify_key = tostring(randomizedoutput) --grabs the player's specific and uniquely generated ID

--ULX Config
local CATEGORY_NAME = "Discord"
local linkdiscord = ulx.command( CATEGORY_NAME, "ulx linkdiscord", ulx.linkdiscord, "!linkdiscord", true )
linkdiscord:addParam{ type=ULib.cmds.CallingPlayerArg } -- First param to the function is the player running the command
linkdiscord:addParam{ type=ULib.cmds.StringArg, hint="discord", ULib.cmds.takeRestOfLine } -- Second param to the function is discord ID string
linkdiscord:defaultAccess( ULib.ACCESS_ALL )
linkdiscord:help( "Links your steam account to discord ID" )

My issue is that when I try and call the 'discord' string parameter, it doesn't translate as a string but defaults to user data (i.e. "Player [1][steam_name]"

I want people to do "!linkdiscord [discordID]" so that I can send the discordID to SQL for matching from the bot
General Chat & Help and Support / ULX jobs not getting the darkrp admin weapons (darkrp)
« Last post by Oclexe on November 14, 2020, 10:59:09 AM »
Hey so as the title says in the darkRP folder I got it so the GM.Config.AdminWeapons  is what i want admins to spawn with, which works for anything that inherits from admin. Then in CAMI it is set so the admin jobs below that spawn with it but on becoming those ranks you do not. Any idea on why it isn't
Developers Corner / Re: Police spawning with a extra weapon
« Last post by JamminR on November 07, 2020, 11:56:21 AM »
Are there errors at startup in server console? What about when players join?
That code really isn't much to go on.
M9k is a custom addon, right? Could gmod or another addon be defaulting rpg insome way if player joins that doesn't have m9k?
In testing, tried removing all weapons in the job to see if rpg still assigned?
Are police added to any special group Or team? If so, any other addon that adjusts weapons based on group or team?
This very well may be an instance where you need to remove all addons, going down to base gamemode and if problem still exist, ask for help in a DarkRp or whatever gamemode community
Developers Corner / Police spawning with a extra weapon
« Last post by Sharkbait on November 05, 2020, 05:59:14 PM »
All police jobs are spawning with the default half life RPG, I don't know what would be causing this to happen I looked for any signs for fixes online but failed to find people with this same problem.

Before you ask the jobs don't have that in their "weapons"

TEAM_POLICE = DarkRP.createJob("Police Officer", {
   color = Color(25, 25, 170, 255),
   model = "models/taggart/police01/male_08.mdl",
   description = [[The protector of every citizen that lives in the city .
      You have the power to arrest criminals and protect innocents.
      Hit them with your arrest baton to put them in jail
      Bash them with a stunstick and they might learn better than to disobey
      the law.
      The Battering Ram can break down the door of a criminal with a warrant
      for his/her arrest.
      The Battering Ram can also unfreeze frozen props(if enabled).
      Type /wanted <name> to alert the public to this criminal
      OR go to tab and warrant someone by clicking the warrant button
   weapons = {"arrest_stick", "unarrest_stick", "m9k_colt1911", "stunstick", "door_ram", "m9k_mp5"},
   command = "cp",
   max = 10,
   salary = 50,
   admin = 0,
   vote = true,
   sortOrder = 1;
   category = "Police",
   hasLicense = true

that's how one of the police jobs look. No other jobs spawns with an rpg other than police jobs.

every other job that is not police, spawn with their correct weapons.
Off-Topic / Re: ULX rank other than User and Superadmin+ cant join a job
« Last post by JamminR on November 03, 2020, 05:50:39 PM »
ULX has nothing to do with jobs or teams.
ULX is administrative 'group' control.
You'll likely need to research whatever mod or gamemode controls 'jobs' and ensure it allows whatever groups ULX controls to have them.
Pages: 1 2 [3] 4 5 ... 10