[INFO] Invisible or glitched Peds List

Probably related to “not updating to the default drawable variations”. Could possibly be solved by the code @Warxander provided. Does not always seem to work, you might need to change some components even after calling SetPedDefaultComponentVariation before others can see you.

Interesting, I will mess around with trying to “Refresh” the components by setting everything after changing the player’s model and will post back with results if they are consistent.

EDIT:
Further testing shows that changing the texture does work via Trainer. Going to see what i need to do in code to replicate. Will edit with results

Success:
@Wunder_Wulfe

In order to use many of the skins for animals you will have to first load the skin to the character, then apply a texture change.

Additionally
SetPedDefaultComponentVariation(PlayerPedId())

will do nothing. You are required to use API.SetPedComponentVariation(); to update the model to be visible to everyone. By changing something about the texture of any slot. I also believe you have to set it to non-current value, meaning that you have to changing something about the model from default.

@Vespura
I think the way to bandaid fix this is to run what every code chunk updates clients when changing textures to also run when changing models. Basically point the model change to “update” or change textures either to full default, or texture 1 then back to texture 0. This will ensure that on model load the model will be visible to all because it ran the texture change.

Example Code:
(Note:

Important:
Background worker is required to wait 1 second before reloading model texture. If you were to place SetPed… one after another it would fire too quickly and not update players in the server to your new model.

Has changed is from my function of loading character’s model. If the model’s features haven’t changed then hasChanged is false

animals is a list of PedHashes that contain the list of animals that don’t load without changed values. Currently only husky so i know the ped variation is valid.

pedHash being the current PedHash passed to this snippet
)

//....
if (!hasChanged && animals.Contains(pedHash)){
          API.SetPedComponentVariation(API.GetPlayerPed(-1), 0, 0, 1, 0);
          var worker = new BackgroundWorker();
          worker.DoWork += (s, args) => {
                 Thread.Sleep(1000);
          };
          worker.RunWorkerCompleted += (s, args) => {
                 API.SetPedComponentVariation(API.GetPlayerPed(-1), 0, 0, 0, 0);
         };
         worker.RunWorkerAsync();
}
//....
2 Likes

This solved spawning ‘ig_jimmydisanto’ and the animals and more just now 6/13/2020. In fact, it seems all of the blacklist works now with this native after spawn.

Sorry for bumping this ancient topic, but I wanted everyone to know that it actually seems to work.

2 Likes

Glad my findings could be of assistance all these years later :slight_smile:

Hey I just noticed your fix for the ped applying, you may know why when someone changes his ped model the players joined after his ped change still see him as glitched?

does this ban whoever using blacklisted peds?
if a cheater using any peds from blacklisted from menus will they get banned?

So I’ve tried several ped menus now, all the other animals are visible to one another, but the retriever, the rottweiler, the husky and shepherd like chop see other players but I don’t see it myself because I’ve now tested all of the pet scripts over and over the dogs are not that is really annoying, I’m at a loss as to what else I could do

Yes, this needs to be called on each client for each of the “blacklisted” peds. Blacklist just refers to the ones that crash the game/glitch.

No, blacklisted as in they crash the game/glitch, therefore spawning as them is “blacklisted”.

Calling the above posted fix for each player that is an animal including on yourself may fix this. Setup a server script that when a player loads (client side), it tells the server what was spawned, and then tells all players (client side again) to load it with defaults would probably be enough to do it.

you safe my time xD GG my Friend