Jump to content

Plugin Developing; First Time Questions


Recommended Posts

Hello.

I am looking into making modifications for LSPDFR and RAGE, unfortunately, the documentation is very hard to navigate, and somewhat difficult to understand.

I've got a ((pretty bad looking)) code structure already completed, however, I need some help on some things.

First, sorry if I posted this in the wrong section, feel free to move it if necessary. Second, these are very noobish questions, but I'm asking not only for myself, but so others don't have to humiliate themselves asking if they need the same information.

I am writing in C# using VS2015.

I need to know how to, or be refrenced towards how to;
- Make a custom pause menu sector, or lookalike, refrence, British Policing Script
- Disable all human peds and vehicles from naturally spawning
- Spawn vehicles with advanced livery
- Spawn custom human peds, walking and in vehicles
- Set a human or vehicle ped destination
- Override spawning method that the default "Backup" menu uses
- Override default LSPDFR menus.
- Make my plugin run code in another CLI-compliant language, builtin ((safe)) or external ((not safe))
- Override human ped and vehicle AI functions
- Make LSPDFR use stats from my plugin instead of relying on RNGesus, for things such as wanted for, flags, citations, etc.
- Use a multiple-choice menu similar to the "Suicidal Intent" callout to change ped and officer speech and reaction.
 
Using the API's and SDK's, I run into a recurring issue, where the entire structure of the classes and functions imported are not displayed, so I am unsure how to do many of those things.

Also, C# is a new concept for me, so I'm still on the beginner side of things.

I am well aware that this is a difficult task, and may need to be multiple plugins, however, I learn from trial and error, and if I can't figure out the trials, I can't get the errors.

Sorry, and thanks again!

Edited by Thecheater887
Re-type a statement
Link to comment
Share on other sites

I am unable to edit unfortunately, so I need to add a few things.

 

I also need to be able to

- Disable missions

- Get/set velocity

- Get weapon shot fired type and direction ((EG; projectile_RPG, vector:23:789:80:360))

- Retrieve a list of installed mods ((There is a manual way of doing this, just wasn't sure if RAGE had an easier way.))

- Disable all LSPDFR call out natural occurances

- Trigger call outs on command

- Detect if an installed vehicle is the default GTA V vehicle.

- Detect if police vehicles are playing sirens ((may have seen that on the docs. I'll look in a moment, but I know IsPlayingHorn exists.))

 

Yes, I know this is a lot to ask, but, there's more that I may have figured out through some tinkering.

Again, documentation is okay at best, making it difficult for my learning type to work.

I am not sure which of these are or aren't implemented yet, and can't easily navigate the docs to figure that out.

 

Sorry for double posting as well :/

Edited by Thecheater887
Autocorrect
Link to comment
Share on other sites

http://i.imgur.com/I0B5P1Y.png

This topic has been moved to the appropriate forum. Please post in the correct location in the future.

Take a look at the pinned topics in this section I just moved your topic to. 

Invenio, Investigatio, Imperium

Link to comment
Share on other sites

Unfortunately, I did so before posting.

I may be bat-blind, but they weren't the resources I was looking for.

 

There was basic how to's, and some good tips, but not what I would require.

Thanks for the reply and moving he topic to the correct section though!

Link to comment
Share on other sites

2 hours ago, Thecheater887 said:

Unfortunately, I did so before posting.

I may be bat-blind, but they weren't the resources I was looking for.

 

There was basic how to's, and some good tips, but not what I would require.

Thanks for the reply and moving he topic to the correct section though!

In this topic you're basically asking us to write an entire plugin for you. This is not the purpose of this subforum (rather, go to the suggestions forum). This subforum exists to help you get started or when you get stuck when writing actual code.

You are asking about extremely advanced stuff (some of which isn't even possible at this time). As you are a beginner in C#, you should take it down quite a few notches and start simple (understanding and reproducing the beginner guide projects should help you get a feeling for how the basics work, including below issue).

5 hours ago, Thecheater887 said:

Using the API's and SDK's, I run into a recurring issue, where the entire structure of the classes and functions imported are not displayed, so I am unsure how to do many of those things.

If you're having trouble figuring this out, I suggest you follow my video guide to get your basics down (here). You may also be having trouble because you're lacking basic C# knowledge. Follow all the tutorials here: http://rbwhitaker.wikidot.com/c-sharp-tutorials

Not everything in the game is possible via RPH yet. You'll need to use natives, documented here: http://www.dev-c.com/nativedb/

2 hours ago, Thecheater887 said:

Again, documentation is okay at best, making it difficult for my learning type to work.

Actually, the RPH documentation is pretty extensive, well-written and clear. Make use of the Search function and spend some time with the docs while learning simple stuff (like, 10 hours or so at the absolute minimum). This should get you more comfortable. You can also use Visual Studio's IntelliSense if you prefer (RPH has XML documentation as well).

I'd advise you to write simple stuff (doesnt have to be unique, just for practice) to get a proper feeling for RPH & LSPDFR. Continue challenging yourself, but make sure it's well within your skill level. Don't expect to finish coding all of the above points anytime soon if you've just started out.

Good luck.

Edited by Albo1125

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

20 hours ago, Thecheater887 said:

Unfortunately, I did so before posting.

I may be bat-blind, but they weren't the resources I was looking for.

 

There was basic how to's, and some good tips, but not what I would require.

Thanks for the reply and moving he topic to the correct section though!

In addition to what Albo is saying, feel free to join us on the lspdfr developer discord server. You can get a sense of what we as developers do in terms of how far we can go with what we have. It's also a nice place to asks questions about API development. However, you should know the fundamentals of C# first. We tend to not respond to questions which have answers that are easily found.

Link to comment
Share on other sites

  • 4 weeks later...
On ‎7‎/‎10‎/‎2016 at 0:28 AM, tanu1215 said:

In addition to what Albo is saying, feel free to join us on the lspdfr developer discord server. You can get a sense of what we as developers do in terms of how far we can go with what we have. It's also a nice place to asks questions about API development. However, you should know the fundamentals of C# first. We tend to not respond to questions which have answers that are easily found.

I will consider it, but discord and I don't get along very well, unfortunately.

On ‎7‎/‎9‎/‎2016 at 6:37 AM, Albo1125 said:

In this topic you're basically asking us to write an entire plugin for you. This is not the purpose of this subforum (rather, go to the suggestions forum). This subforum exists to help you get started or when you get stuck when writing actual code.

You are asking about extremely advanced stuff (some of which isn't even possible at this time). As you are a beginner in C#, you should take it down quite a few notches and start simple (understanding and reproducing the beginner guide projects should help you get a feeling for how the basics work, including below issue).

If you're having trouble figuring this out, I suggest you follow my video guide to get your basics down (here). You may also be having trouble because you're lacking basic C# knowledge. Follow all the tutorials here: http://rbwhitaker.wikidot.com/c-sharp-tutorials

Not everything in the game is possible via RPH yet. You'll need to use natives, documented here: http://www.dev-c.com/nativedb/

Actually, the RPH documentation is pretty extensive, well-written and clear. Make use of the Search function and spend some time with the docs while learning simple stuff (like, 10 hours or so at the absolute minimum). This should get you more comfortable. You can also use Visual Studio's IntelliSense if you prefer (RPH has XML documentation as well).

I'd advise you to write simple stuff (doesnt have to be unique, just for practice) to get a proper feeling for RPH & LSPDFR. Continue challenging yourself, but make sure it's well within your skill level. Don't expect to finish coding all of the above points anytime soon if you've just started out.

Good luck.

It's been a looonngg time. My fault entirely.

Anyways, Yea. I come back with a clear mindset and that's what I was doing. Oops. Thanks for the redirect.

There's always room to improve, but I think I have got an okay handle on C# now. I'm working on the same project, but I have indeed toned it down a lot, and now I actually feel productive, and not because my code is producing errors either. I need the advanced stuff, to, well, my apologies for this terrible term, "play god" with the game. I pretty much want the game to plop the map down, and spawn what I want spawned, do what I want done, etc, even though I will be using the games' logic to do so, I won't be able to let it manifest using a mind of its' own as vanilla.

I will watch the videos as soon as my internet starts working properly.

I looked back, and yep. It's not as horrible as I originally saw. I still wouldn't mind it having C# code examples that call game functions, as, well, a function, instead of a class, as  am still used to function-based coding.

I would, and I don't, but that doesn't motivate me. ((notify "Hello w0rld!" just doesn't give me that sense of accomplishment any more :()) Doing the impossible does.

And thanks, but I'll need the luck of a god to finish my tasks properly and timely.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...