Help to create a 'Duty System'


#1

Hi,

I have started to create a duty system for my server, the basic idea of it would be to show you on duty as a cop, sheriff deputy, etc but not be targeted by the ai and also allow them to help you via a /backup command. The command im currently working on is the /duty command but im stumped at TriggerClientEvent.

here is what i have so far in the server

  • RegisterServerEvent(“chatCommandEntered”)
    AddEventHandler(‘chatCommandEntered’, function(fullcommand)
    command = stringsplit(fullcommand, “”)

if(command[1] == “/duty”) then
TriggerClientEvent

if anyone could make any suggestions on how to proceed from there it would be much appreciated. .


#2

Hi Wolfstrike, just wondering did you ever get this sorted out as I’m looking to do the same on my server. Thanks


#3

not really because i could never figure out where to go from there


#4

alright thanks anyway. have you come across anything new that is good for a police/fire dept/ems roleplaying server such as commands or scripts. Thanks in advance


#5

not as of the moment, except for no siren, but thats really it. If i could find an arrest script it would really be good for an rp server but at this point idk where it could be.


#6

https://forum.fivereborn.com/topic/458/script-admin-script-source-code-sneak-peak there is an arrest script here. havent tested it out yet so cant say it works for certain


#7

not really an arrest script there


#8

if you go to page and click source code it brings you to a github page that has admin commands. on top of these it says FiveReborn—MultiFive-Real-Life-Roleplay-Server, click that, then resources and then arrest


#9

got it, thanks. I may test it. if you wanna join my server to help me test it then send me a chat message or join my discord at: http://discord.gg/c4YBWau


#10

#11

@GanjaMonster will it work server side or will it throw errors?
Has it been tested?


#12

it can throw errors due to other resources that you might be using so if it dose disable some , and it needs work but basics are there


#13

@GanjaMonster okay, i tested it, now is there a key that allows you to get out of the menu once you get a ped on the ground?


#14

@Wolfstrike said in Help to create a 'Duty System':

@GanjaMonster okay, i tested it, now is there a key that allows you to get out of the menu once you get a ped on the ground?

Left arrow key


#15

@kanersps make a ini with keys so everyone knows whats what