Log in to reply

Where to begin?

  • I'd like to start making plugins, and scripts for LSPDFR and figured I'd start with a rather simple one requested to me by a friend. I basically want to create a plugin that will open both driver and passenger doors of the current vehicle that you're in at the press of a key. I come from a C++ background and not sure if I should stick with that or go the dotNET route and use C#.

    Anyone care to guide me?

    I've currently got a C# project up and running and using this.
    using LSPD_First_Response.Mod.API;
    using LSPD_First_Response.Engine.Scripting.Entities;

    Though I'm having trouble finding any functions or events that relate to doorOpen or anything of the sort.

  • You'll have to use RagePluginHook to make scripts with LSPDFR. LSPDFR uses RagePluginHook.

    Opening doors in RPH:

    VehicleDoor[] doors = Game.LocalPlayer.Character.CurrentVehicle.GetDoors();

    Documentation of RPH.

  • @Jitnaught Thank you kindly! That's exactly what I needed to get this thing up and going!

  • @Jitnaught How do you check for a keypress with just Rage? I can't include GTA (using GTA;) with Rage without getting ambiguous errors.

  • @GunnDawg
    RPH doesn't have a GTA namespace as far as I know. Everything should be under the Rage namespace. The GTA namespace is from Script Hook V .NET.

    You can use Game.IsKeyDownRightNow(...) to check if a key is pressed, but that's all I know about (I don't use RPH so this is just from looking at other people's code).

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.