[Release] Better /911 Commands


#1

Better /911 Commands

I decided to write this as there a lot of /911 commands on the forums and I wanted to write one that was a little different. Enjoy, modify it to how you wish.


How to use:

  • /911 for example on how to use the commands.

  • /911pd For Police emergency.

  • /911fd for Fire emergency.

  • /911ems for Medic emergency.


Screenshot:

7e6ae7625e8fa01d42057f45c44bcff1


Download:

Click me!



#2

What if the call requires all three departments :thinking:


#3

That’s is a great idea, might add the street hashes also.


#8

Ummm… okay mate cool I guess :joy:


#16

Well done Lucifer :+1:

It seems that some posts on this thread have been deleted, but you are considering to add streetnames?


#17

I am and the posts were deleted via a moderator, they were from a troller using a proxy to spam resources.


#18

Ok you got the message emergency. with or without a gps dispatch?


#19

The emergency, is just what I entered, you can change that, soon I might add the street locations, and set the event so that only people added to the config in the server.lua will be able to see the message and when an officer responds only the person making the call will see that an officer has been dispatched.

I’m just busy with college and other projects currently. This was something I wrote in like 5 minutes.


#20

You should also make it so when they type the command, lets say you type /911pd, the call is only broadcasted for people in the police department skins. Same for fire/emt. Rather than adding people into the cfg.


#21

that sounds great! I will keep an eye on this script, thank you! that would finally be an alternative to the panic-script, which was strangely converted to a dll and you can not really use it


#22

Hello, nice resource it could be very useful. What If you can call admins too using /911a?

There are a lot of admin call scripts Ikr, but I would use this script if I’m able to call police, ems, fire and admin just using one chat command.

I made something quickly, just to show what I mean (100% I coded it wrong xD)

RegisterCommand("911", function(source, args, rawCommand)
    TriggerEvent('chatMessage', "^3To use ^1/911 ^3Use either ^1/911pd^0, ^1/911ems, ^1/911fd or ^1/911a")
end, false)

RegisterCommand("911pd", function(source, args, rawCommand)
    local name = GetPlayerName(_source)
    local message = table.concat(args, " ")
    TriggerEvent('chatMessage', "^1911 [Police] | Caller ID: ^0" .. name, { 30, 144, 255 }, message)
end, false)

RegisterCommand("911ems", function(source, args, rawCommand)
local name = GetPlayerName(_source)
    local message = table.concat(args, " ")
    TriggerEvent('chatMessage', "^4911 [EMS] | Caller ID: ^0" .. name, { 30, 144, 255 }, message)
end, false)

RegisterCommand("911fd", function(source, args, rawCommand)
    local name = GetPlayerName(_source)
    local message = table.concat(args, " ")
    TriggerEvent('chatMessage', "^1911 [Fire] | Caller ID: ^0" .. name, { 30, 144, 255 }, message)
end, false)

RegisterCommand("911a", function(source, args, rawCommand)
    local name = GetPlayerName(_source)
    local message = table.concat(args, " ")
    TriggerEvent('chatMessage', "^1911 [Admin] | Caller ID: ^0" .. name, { 30, 144, 255 }, message)
end, false)

#23

Yeah that’s is actually reallu helpful, would make it so much easier.


#24

Yeah for sure that would probably require a config however, as me personally I dislike essentialmode.


#25

There could be source code for that, me personally I prefer C# to Lua however. Lua is easier to edit and use for beginners and most people would probably struggle with editing it in VS if they haven’t coded before, that’s why I don’t release my C# resources.


#26

that would be very nice vllt you can work together eg in translation (I’m from Germany) can help in German, Turkish and Dutch;)

think with lua most of them get along, will write to you right now img


#27

I’m going to be honest, I have no idea what you are saying.


#28

Update 1.1


I’ve added street locations and better layouts to the commands.

Download:

Click me!


Screenshot: