It’s meant to be used on servers with low pop, so people aren’t just sat around waiting for enough cops to do a robbery. Which, I know might be shocking to you, doesn’t happen on servers with hundreds of people playing it.
The client side loop will kill any server, if you have 100 players then u have 100 callbacks every 1 second checking 100 players job. You can change the loop server side and check for online cops every 1 minute and then update the whole server, that way you are running 1 loop and checking 100 players 1 time every 1 minute I wish I could do a PR but I have no clue how to do it haha
Gotcha, I thought eden was referring to the script killing a server, due to the amount of users that could have wanted stars and therefore the massive amount of Peds. If he had pointed that out, I’d have sorted it by now. Thanks for the info though!
EDIT: Thanks to AV, the script has now been optimized
Tested it out adding the export to a few scripts and i’m a big fan of the idea/script.
A quiet/low pop server immediately felt more alive.
Only thing i noticed is heli’s would target and tail me correctly while the cars usually would drive past me or not spot me. it feels like they focus on a location I was at x-amount of seconds ago when they spawned in and then target me correctly afterwards.
Other than that, this is great. Will follow this along closely
Sorry about that, I forgot to add a Callback to the function itself. Now when the export is used, the function that’s triggered will check for cops and only give you wanted stars if copCount = 0.
Thank you for checking! Did try to call the SetCopsOnline / SetCopsOffline function but had some weird stuff going on with them only following me for short distance then just disappear and only spawning at police station and around legion square. Before I did change that not had that issue. Not tried with the callback yet so will test that tomorrow and let you know.