[Release] Panic Button Script

Would removing the “Officer” part and making it " (Name) pressed the panic button" be better?

I think that would be great! Some servers might have several departments so that would be very useful!

2 Likes

its not working for me for some reason. I try to add myself in there and it keeps saying no result

Hello and thank you for your very useful script I have a console error when I remove a player from the list
https://gyazo.com/102cffe731dd3faac639e800f7bb8455

This should not be returning an exception, i’ll look into it for the next update. But for now, are you using the server id or the officer id?

its not working for me, I don’t know what I’m doin wrong. put it in my resources and go to try to add myself and nothing

Did you start the resource?

that I did and still nothing

Are you using the latest version? Could you send me a log of the plugin being started?

i’am using officer id

This does not work for me this is what i get when starting the script.

Loaded PanicScriptServer.net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1976335684
Failed to instantiate instance of script PanicScriptServer.PanicScriptServer: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Users\Administrator\Desktop\FXServer1\resources\panic\dbs\cops.db".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00183] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.Open (System.String path, System.IO.FileMode mode) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at PanicScriptServer.Database..ctor (System.String file, System.Boolean createFile) [0x00026] in <dfede5e9e41b47fea8bbae3df9f2775b>:0
  at PanicScriptServer.PanicScriptServer..ctor () [0x00015] in <dfede5e9e41b47fea8bbae3df9f2775b>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
   --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at CitizenFX.Core.InternalManager.CreateAssemblyInternal (System.Byte[] assemblyData, System.Byte[] symbolData) [0x00069] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\InternalManager.cs:78

Did you install the resource “panic” in the root of your RESOURCES folder?

Works absolutely fine just wish it was open source or maybe setup a config. So a bind key can be changed.

yes i did. i also right click the file unblocked before unzipping, i tried reinstalling again as well.

Can you send me a screenshot of your resources folder and a screenshot of the “panic” folder.

It’s currently closed source until i make the final version, i’ll then release the source code for it. Same goes for my other plugins.

my apologizes i just relized it was in a sub folder. i had my wisdoms out so im alittle loopy… anyway of having it in sub folders?

Not currently, i’m working on something that will change the structure of most of my police-related scripts so it’ll make everyone’s lives easier.

Yo, awesome Script!
Is there any chance to configure:

  • Text
  • duration of the map blimp (for now its staying forver if noone goes there, or?)
  • Button to activate
  • that admins can use the ingame console F8 to add/remove cops

Thanks for your awesome work :slight_smile:

Doesnt work for me
So idk