LMSDev / LSPDFR-API

The official LSPDFR API repository maintained by the LSPDFR team and our awesome community. Dedicated to provide examples for API integration as well as useful helper classes for plugin development.
43 stars 15 forks source link

[REQ] Custom notes/remarks in Police Computer #5

Open Stealth22PD opened 9 years ago

Stealth22PD commented 9 years ago

Adding this so LMS doesn't forget.

From this thread: http://www.lcpdfr.com/forums/topic/53351-peds-ignore-lspd-when-their-persona-is-set

"I don't know if this is feasible for you guys, but there might be a workaround for this...

Would it be possible for you guys to add the ability to add 'notes' that would show up when you ran a Ped through the police computer?

Rather than trying to set a Ped's persona, could we define custom text that would show up when you ran their name through the computer? So instead of setting a Persona with IsCop set to true (and possibly causing conflicts elsewhere), could we set the Ped's 'notes' to be, 'Subject is an off duty police officer'? It would open up other possibilities too. Like, you could have a Ped show in the computer as, 'Subject has a mental illness', or 'Subject has a history of violence against police; use caution'."

Ethenal commented 9 years ago

I like the idea of a "Notes" field, but that sounds like a big block of text that could be parsed arbitrarily and might be difficult to operate independently amongst multiple plugins.

If we had maybe a Persona.GetCustomVariable("Stealth22_IsCop") == false kind of thing, essentially a custom associative array attached to each persona, where by default there are no elements assigned, and a plugin creator may do (psuedocode, i havent worked with personas yet)

Persona persona = ped.GetPersona(); persona.CustomVars["IsCop"] = true;

and then any plugin (including other plugins loaded at the same time, therefore potentially allowing the plugins to gain information from each other!) could access that value that we set on the custom associative array.

i have a feeling this could be a potentially very useful feature :) and I feel like some of C#'s language facilities might make it a pretty smooth implementation

Stealth22PD commented 9 years ago

I see what you're saying, and I do agree. But then what if we want to display that information to the user via the Police Computer?

Ethenal commented 9 years ago

I see what you're saying now - definitely a good idea. As a pure informational thing it would definitely add a lot to realism and what behavior to expect from a suspect during a stop. I'm sure the LSPDFR team could add that quite easily - however I'm not sure where you'd display the text. The computer overlay screen disappears once you hit enter, and it just displays the info on a notification... if custom text were to be allowed, that might require some sort of interface change, since the custom text value could be much longer than is reasonable for a notification.

Stealth22PD commented 9 years ago

I'm sure we could cap it at a certain character limit. Now, that being said, "Subject has a history of violence against police; use caution" is 61 characters long, which may or may not be too long. So I'm not sure what we can do there. Maybe a second notification displays the text? Up to 75 characters or something?