Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Entity Extra


qiangqiang101
 Share

Recommended Posts

qiangqiang101

I wrote a simple plugin to help developers make better mods, feel free to let me know what to add next

 

**********
PedExtra
**********

- Usage
Dim XPlayer = New PedExtra(Game.Player.Character)

- Get Ped's Hat
Dim PedProps As Integer = XPlayer.GetPedProp(PedPropsVars.PROP_HATS)

- Get Ped's Hat Texture
Dim PedPropTexture As Integer = XPlayer.GetPedPropTexture(PedPropsVars.PROP_HATS)

- Change Player's Component Variation
PedExtra.SetComponentVariation(Game.Player.Character, PedComponentsVars.COMPONET_TORSO, 1, 2, 3)

- Change Player's Props
PedExtra.SetPropIndex(Game.Player.Character, PedPropsVars.PROP_HATS, 1, 2, True)

- Get Number of Hat Prop Drawable Variations
Dim Num As Integer = XPlayer.GetNumberOfPropDrawableVariations(PedPropsVars.PROP_HATS)

- Get Number of Prop Texture Variations
Dim Num As Integer = XPlayer.GetNumberOfPropTextureVariations(2)

- Get Number of Palette Variation
Dim Num As Integer = XPlayer.GetPaletteVariation(PedComponentsVars.COMPONET_TORSO)

- Get Number of Texture Variations
Dim Num As Integer = XPlayer.GetNumberOfTextureVariations(PedComponentsVars.COMPONET_TORSO, 1)

- Get Texture Variation
Dim Num As Integer = XPlayer.GetTextureVariation(PedComponentsVars.COMPONET_TORSO)

- Get Number of Drawable Variations
Dim Num As Integer = XPlayer.GetNumberOfDrawableVariations(PedComponentsVars.COMPONET_TORSO)

- Get Drawable Variation
Dim Num As Integer = XPlayer.GetDrawableVariation(PedComponentsVars.COMPONET_TORSO)

- Clear All Ped's Props
PedExtra.ClearAllPedProps(Game.Player.Character)

- Set Player Default Component Variation
PedExtra.SetDefaultComponentVariation(Game.Player.Character)

- Get the Weapon Ped was using in Hash
Dim WeaponHash As Integer = XPlayer.GetCurrentWeaponPedUsing()

- Is Player exiting a vehicle? (Sub Task)
Dim Bool As Boolean = XPlayer.IsSubtaskActive(Subtask.EXITING_VEHICLE_CLOSING_DOOR)

- Is Player Driving?
Dim Bool As Boolean = XPlayer.IsDriving()

- Make Player Ragdoll 5000ms
PedExtra.Ragdoll(Game.Player.Character, 5000)

- Change Ped Model
XPlayer.SetPedModel = PedHash.AmandaTownley

- Is Ped Can Use? (Exist)
Dim Bool As Boolean = XPlayer.CanUse()

- Get Ped's Model
Dim Text As String = XPlayer.GetPedModel()

- Play Drinking Wine Animation
PedExtra.TaskPlayAnim(Game.Player.Character, "[email protected]", "drinking_wine", -1)

- Play Drinking Wine Animation Loop
PedExtra.TaskPlayAnimLoop(Game.Player.Character, "[email protected]", "drinking_wine", -1)

*********
UIExtra
*********

- Spawn a working Television
Dim TVProp As Prop
Dim TVID As Integer = UIExtra.GetTVRenderTargetID()
Public TVBool As Boolean = False

If TVProp = Nothing Then
Dim tvmdl As Model = New Model(1036195894)
tvmdl.Request(250)
If tvmdl.IsInCdImage AndAlso tvmdl.IsValid Then
While Not tvmdl.IsLoaded
Wait(50)
End While
TVProp = World.CreateProp(tvmdl, World.GetNextPositionOnSidewalk(Player.Position), True, True)
End If
tvmdl.MarkAsNoLongerNeeded()
End If
UIExtra.TurnOnTV(TVProp, TVID, UIExtra.TVChannel.Channel1, False)
TVBool = True

- Update TV Screen every tick (Should call on every tick)
Dim TVID As Integer = UIExtra.GetTVRenderTargetID()

If TVBool Then 'Update TV Screen
UIExtra.DrawTVScreenEveryFrame(TVID)
End If

- Turn off the TV
UIExtra.TurnOffTV()

- Display Help Text on Screen
UIExtra.DisplayHelpTextThisFrame("Press " & ControlButton.VehicleCinematicDownOnly & " to do something.")

- Display Notification on Screen with Contact icon
UIExtra.DisplayNotificationThisFrame("I'm Not MentaL", "You pressed the N key.", ContactIcon.Barry, True, UIExtra.IconType.RightJumpingArrow)

- Read/Write CFG (As Seen on Single Player Apartment, Premium Deluxe Motorsport Car Dealership, Gymnasium, etc)
Dim Text As String = UIExtra.ReadCfgValue("Key", "Value", "C:\FileName.cfg")
UIExtra.WriteCfgValue("Key", Text, "C:\FileName.cfg")

- Draw Text on Screen
UIExtra.DrawText("Hello World!", New PointF(100, 100), 1.5, System.Drawing.Color.Red, GTAFont.Pricedown, GTAFontAlign.Left, GTAFontStyleOptions.DropShadow)

- Get Player's Radio Station Name
Dim RadioStationName As String = UIExtra.GetPlayerCurrentRadioStation()

- Play External Sound/Music File with Volume Control
UIExtra.PlayExternalSoundFile("C:\sound.wav", 50)

**************
VehicleExtra
**************

- Usage
Dim XVehicle = New VehicleExtra(Game.Player.Character.LastVehicle)

- Get/Set Door Angle (0.0 to 1.0)
XVehicle.DoorAngle(VehicleDoor.FrontRightDoor) = XVehicle.DoorAngle(VehicleDoor.FrontLeftDoor)

- Open/Close Bomb bay Doors
VehicleExtra.OpenBombBayDoors(Game.Player.Character.LastVehicle)
VehicleExtra.CloseBombBayDoors(Game.Player.Character.LastVehicle)

- Set Player Last Vehicle
VehicleExtra.SetPlayerLastVehicle(Vehicle)

- Make Vehicle drops money when exploded
XVehicle.SetVehicleDropsMoneyWhenExploded = True

- Get Ped's Vehicle Weapon in Hash
Dim VehicleWeapon As Integer = XVehicle.GetVehicleWeapon(Game.Player.Character)

- Can Use Vehicle? (Exist)
If XVehicle.CanUse Then
UI.Notify("This Vehicle Can Use")
End If

- Get Vehicle's Model
Dim Text As String = XVehicle.GetVehicleModel()

************
WorldExtra
************

- Load GTA Online Maps
WorldExtra.LoadOnlineMaps()

- Unload GTA Online Maps
WorldExtra.UnLoadOnlineMaps()

- Get Interior ID (Example: Premium Deluxe Motorsport)
Dim InteriorID As Integer = WorldExtra.GetInteriorID(New Vector3(-59.793598175048828, -1098.7840576171875, 27.2612))

- Enable Interior Prop (Example: Premium Deluxe Motorsport)
WorldExtra.EnableInteriorProp(New Vector3(-59.793598175048828, -1098.7840576171875, 27.2612), "csr_beforeMission")

- Disable Interior Prop (Example: Premium Deluxe Motorsport)
WorldExtra.DisableInteriorProp(New Vector3(-59.793598175048828, -1098.7840576171875, 27.2612), "csr_beforeMission")

- Make Hidden Interior Visible (Example: 10 Car Garage)
WorldExtra.SetInteriorActive(New Vector3(222.592, -968.1, -99))

- Make Hidden Map or Interior Visible (Example: Custom Apartment)
WorldExtra.ToggleIPL("apa_v_mp_h_01_a")

- Remove Hidden Map or Interior (Example: Custom Apartment)
WorldExtra.RemoveIPL("apa_v_mp_h_01_a")

- Change Interior like Custom Apartment in GTA Online
WorldExtra.ChangeIPL("apa_v_mp_h_01_a", "apa_v_mp_h_01_b")

 

Download link: http://www2.imnotmental.xyz/tool/entity-extra/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.