Jump to content

Support for Console commands

Closed 1.1.1 1.1.2

Stampy
Stampy

Posted

Hi please could you make it possible to use console commands to put someone on duty or off as it currently doesnt work

 

already off duty!
pd 76561198334320942
Failed to call hook 'policeOnDuty' on plugin 'Police v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.Police.policeOnDuty (Oxide.Core.Libraries.Covalence.IPlayer player, System.String command, System.String[] args) [0x0011c] in <80a1eeadbaf34bea9d759478d9c75c07>:0 
  at Oxide.Plugins.Police.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0045d] in <80a1eeadbaf34bea9d759478d9c75c07>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <cd9a02fd331347bd82d550bb1a9c8e9f>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <b76ec77c47d1449e92b2baab8603843d>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b76ec77c47d1449e92b2baab8603843d>:0 
pde 76561198334320942
already off duty!

CommandoSoldat

Posted

Changed Status from Pending to Closed

Changed Fixed In to 1.1.2

CommandoSoldat

Posted

Please use Police.pd (SteamID) or Police.pde (SteamID)

Updated the Plugin you can now set a player with permission on or off duty in Console remotely

DrummerJacob

Posted

On 1/26/2024 at 2:59 AM, CommandoSoldat said:

Please use Police.pd (SteamID) or Police.pde (SteamID)

Updated the Plugin you can now set a player with permission on or off duty in Console remotely

Hi!

How would I grab the (SteamID) of a player to use for "Server Commands" or "Player Commands"?  I am trying to use "Police.pd (SteamID)" in the "Server Commands": [] section, but not sure the proper syntax for getting a players ID to use for the command to join/unjoin police.

Any suggestions? Thanks and im liking the plugin so far!

CommandoSoldat

Posted

20 hours ago, DrummerJacob said:

Hi!

How would I grab the (SteamID) of a player to use for "Server Commands" or "Player Commands"?  I am trying to use "Police.pd (SteamID)" in the "Server Commands": [] section, but not sure the proper syntax for getting a players ID to use for the command to join/unjoin police.

Any suggestions? Thanks and im liking the plugin so far!

if you have Rustadmin which you should as a server owner then you can see the steamID in the player list section. Right click the player in the list and select steamID64 then paste it in the command section of your Rustadmin console like so Police.pd 13215432164321635  <-- the number here should be the real steamID of the player

DrummerJacob

Posted

On 1/14/2025 at 2:31 AM, CommandoSoldat said:

if you have Rustadmin which you should as a server owner then you can see the steamID in the player list section. Right click the player in the list and select steamID64 then paste it in the command section of your Rustadmin console like so Police.pd 13215432164321635  <-- the number here should be the real steamID of the player

Yea I know how to find a players' Steam 64 ID manually, what I mean is im trying to know the right syntax or way to have a plugin "TalkingNPC" send a command thats going to assign the {player} both to Police permissions that I have setup to go along with the /pd job assignment but I dont know the name of the player, the NPC will only know.

When I say "SteamID" what I mean is their player name.  I already have it so TalkingNPC character will send "/pd" from the players side when they talk to the NPC, to make it feel like a real conversation instead of just typing /pd.  But I also want it to give Police related permissions from console that I have setup.  Do you know how to call the player variable like {player name} or something in a command so I can do:

oxide.usergroup add <name> <group>

I dont know what to put for <name>.  The NPC will be automatically sending this command so I wont be there to put in a name for it...im a bit confused.

CommandoSoldat

Posted

On 1/16/2025 at 3:26 AM, DrummerJacob said:

Yea I know how to find a players' Steam 64 ID manually, what I mean is im trying to know the right syntax or way to have a plugin "TalkingNPC" send a command thats going to assign the {player} both to Police permissions that I have setup to go along with the /pd job assignment but I dont know the name of the player, the NPC will only know.

When I say "SteamID" what I mean is their player name.  I already have it so TalkingNPC character will send "/pd" from the players side when they talk to the NPC, to make it feel like a real conversation instead of just typing /pd.  But I also want it to give Police related permissions from console that I have setup.  Do you know how to call the player variable like {player name} or something in a command so I can do:

oxide.usergroup add <name> <group>

I dont know what to put for <name>.  The NPC will be automatically sending this command so I wont be there to put in a name for it...im a bit confused.

The player gets the usergroup "dutygroup" automatically if the player goes on duty with /pd it is integrated in the plugin. What you can do is take this group "dutygroup" which comes with the plugin and put all your permissions you want the police to have to that group "dutygroup". Once the player then interacts with the TalkingNPC and triggers the /pd the dutygroup will be assignt and the player has all the permissions from that group. Once the player triggers /pde thought the NPC the "dutygroup" gets automatically removed from the player so he i does not longer have the permissions from that group while of duty. I implemented this feature a while ago. If you read the description from the plugin carefully you can see that. So i would recommend using my inbuild group which the player gets once on duty

  • Like 1
DrummerJacob

Posted

55 minutes ago, CommandoSoldat said:

The player gets the usergroup "dutygroup" automatically if the player goes on duty with /pd it is integrated in the plugin. What you can do is take this group "dutygroup" which comes with the plugin and put all your permissions you want the police to have to that group "dutygroup". Once the player then interacts with the TalkingNPC and triggers the /pd the dutygroup will be assignt and the player has all the permissions from that group. Once the player triggers /pde thought the NPC the "dutygroup" gets automatically removed from the player so he i does not longer have the permissions from that group while of duty. I implemented this feature a while ago. If you read the description from the plugin carefully you can see that. So i would recommend using my inbuild group which the player gets once on duty

Thank you very much for explaining that! I was just thinking about it wrong. I didnt quite understand what dutygroup is.  That all makes sense though!  Cheers

  • Like 1
1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.3k

Files Sold

Total number of files sold.

2.3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.