@Niziul Please don't lose anymore time with this. I'm going to stick with 3.1 for now. Thanks so much for your help.
JohnFromGWN
View profile on GTA5-Mods.com »
Asking for Forum Help
Help and Modding Checklist Videos and Tips
GTA5 911 Help Desk Videos
Why you shouldn't use OIVs
Basic Ped YMT Editing - Components, Clothes, Textures
New Users - Menyoo or Simple Trainer?
How to Install Vehicle Addon in 2022 - From A to Z
Posts made by JohnFromGWN
-
RE: Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
-
RE: Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
@Niziul I don't know what to say. My script in 3.4 works perfectly for Player, inconsistently for ped. What I mean by inconsistently, it's almost as if it had to be initiated.
For example I'll press RPG and nothing happens, I keep hitting it nothing, I keep cycling through the weapons and then suddenly it works, as if it was waiting for something requested and then loading.
-
RE: Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
@Niziul Yes, exactly.
public static Ped PP = Game.Player.Character;
-
RE: Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
@Niziul Just to clarify, the code works as expected with SHVDN3.1 but in SHVDN3.4 there are lags and inconsistencies. I was happy with the script because the code is minimal.
I forgot to mention the most puzzling part. I have a second, almost identical function for the Player - but for some reason that one doesn't have any issue in SHVDN3.4 - it works with both. Only the Ped code breaks. WTF?
And the editor will not show errors. It will compile and the script will run in both 3.1 and 3.4. However 3.4 does not run consistently and the documentation clearly says they made changes to the weapons - but nothing i understand.
This is the Player, identical code, PP= Player ped. Why should this one work and not the one for the ped for V3.4?
public void ChangeWeapons(object sender, EventArgs e) { String MyChoice = WeaponsSubmenu.SelectedItem; { WeaponHash wepHash = (WeaponHash)Enum.Parse(typeof(WeaponHash), MyChoice); PP.Weapons.Give(wepHash, 5000, true, true); } }
The video below is with 3.1 and shows the script runs without lag, without inconsistencies, without any issues.
-
RE: Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
@Niziul I was just copying your code and it disappeared. lol. how come?
-
RE: Unable to use the mods file
There are 2 update.rpf files.
The one in your mods folder is at
\Grand Theft Auto V\Mods\update
or could be
\GTAV\Mods\update
or something similarThe one in your games folder is at the same path but remove the mods
\Grand Theft Auto V\update
or could be
\GTAV\update
or something similarAt this point I think your setup is really badly screwed up.
My advice would be to first do a verify integrity to ensure the game vanilla files are not corrupted or replaced.
Then I would strongly suggest you review your folder structure to ensure all the files are in the right place. I've seen Youtube videos where they put update.rpf in the wrong place.
You also need to ensure your game version is compatible with the gameconfig.xml mod (and have heap and pack) .
Finally I would strongly consider doing your entire mods from scratch - just keeping your dlclist.xml.This thread also can be useful to ensure you did everything right.
https://forums.gta5-mods.com/topic/35789/gta5-911-help-and-checklist-what-to-do-when-mods-make-you-mad -
RE: Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
@Niziul It comes from a LemonUI menu, as strings.
The weapon selection options are chosen from here (this is what is displayed in the menu):
private static readonly NativeListItem<String> WeaponsSubmenu2 = new NativeListItem<String>("Ped Weapons", "", "Unarmed", "Bat", "SMGMk2", "RPG", "Machete", "Nightstick", "Molotov", "Grenade", "GrenadeLauncher", "FlareGun", "SniperRifle");
This is where the trigger is
submenuPed.Add(WeaponsSubmenu2); WeaponsSubmenu2.Activated += ChangeWeaponsPed;
-
RE: Can't enable online map on version 1.60 2628.
@Michael317 Sorry I don't know. Hopefully someone esle has run across this. I'm still with 2372 and have avoided so many issues.
-
Code breaks from SHVDN3.1 to SHVDN3.4. Fix?
My game is frozen in time but I recently had to update SHVDN from 3.1 to 3.4 to try out a new mod using LemonUI.
Mod worked fine but I realized my own LemonUI menu for weapons was now broken. So I reverted back to 3.1
I looked at the documentation, post 3.1 and because I'm not a programmer it's hard for me to understand but at least i can see they made changes that coincide with my code:
additional enum values for WeaponComponentHash and WeaponAttachmentPoint, and additional properties for missing enum values of WeaponAttachmentPoint
My code that works in 3.1 but not if I upgrade to 3.4 is this:
public void ChangeWeaponsPed(object sender, EventArgs e) { String MyChoice = WeaponsSubmenu2.SelectedItem; { WeaponHash wepHash = (WeaponHash)Enum.Parse(typeof(WeaponHash), MyChoice); CurrentPed.Weapons.Give(wepHash, 5000, true, true); // weapon components: Function.Call(Hash.GIVE_WEAPON_COMPONENT_TO_PED, CurrentPed, WeaponHash.HeavyPistol, 0xC304849A); //suppressor } }
Although I don't mind staying at 3.1 forever, would be nice to know why my code broke with subsequent updates.
-
RE: Unable to use the mods file
@Narga so it's your addons or PC.