Author Topic: Command not showing up  (Read 266 times)

0 Members and 1 Guest are viewing this topic.

Offline epictroller629

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Command not showing up
« on: October 14, 2018, 11:14:26 AM »
I need help with these commands i cant see any of them in the XGui please help

Game mode(s) I am having this problem on:
DarkRP

Code: [Select]
local CATERGORY_NAME = "Respawn"

function ulx.respawn( calling_ply, target_ply )
    if not target_ply:Alive() then
    target_ply:Spawn()
ulx.fancyLogAdmin( calling_ply, true, "#A Respawned #T", target_ply )
end
end

local respawn = ulx.command( CATERGORY_NAME, "ulx respawn", ulx.respawn, "!respawn", true )
respawn:addParam{ type=ULib.cmds.PlayerArg }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:help( "Respawns a player/target cmd made by Drew" )

function ulx.srespawn( calling_ply, target_ply )
    if not target_ply:Alive() then
    target_ply:Spawn()
ulx.fancyLogAdmin( calling_ply, true, "", target_ply )
end
end

local respawn = ulx.command( CATERGORY_NAME, "ulx srespawn", ulx.srespawn, "!srespawn", true )
respawn:addParam{ type=ULib.cmds.PlayerArg }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:help( "Silenty respawns a player/target cmd made by Drew" )

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 775
  • Karma: 50
Re: Command not showing up
« Reply #1 on: October 14, 2018, 11:18:56 AM »
I'm pretty sure it's because both of your commands use the same variable ("respawn") when defining the command.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline epictroller629

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Command not showing up
« Reply #2 on: October 14, 2018, 11:20:12 AM »
I'm pretty sure it's because both of your commands use the same variable ("respawn") when defining the command.
Well When I Has Only one command it still didnt work why?

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 775
  • Karma: 50
Re: Command not showing up
« Reply #3 on: October 14, 2018, 11:22:21 AM »
If you tried removing one after you had them both in, they'd still be defined in data/ulib/misc_registered.txt
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline epictroller629

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Command not showing up
« Reply #4 on: October 14, 2018, 11:24:58 AM »
I'm Saying I Added srespawn After a test with just respawn

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7922
  • Karma: 372
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Command not showing up
« Reply #5 on: October 14, 2018, 11:25:32 AM »
And, if removing/deleting the misc_registered.txt doesn't help, we really can't read minds by looking at code.
At first glance for the time most of us have to take, the command should work, IF it's registered on both client and server.
If there are errors, look for them at server startup in server console, and in both server and game console when trying to run the command.
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline epictroller629

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Command not showing up
« Reply #6 on: October 14, 2018, 11:36:50 AM »
I Have Fixed My Problem Thx For The Help  ;) :)