Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork630
Is there any possibility for spawning custom peds?#1515
-
can I spawn addon ped in v2? source/scripting_v2/GTA.Native/PedHash.cs is there option to spawn by model name? |
BetaWas this translation helpful?Give feedback.
All reactions
i think by "custom ped"@patryksuu is not referring to peds like player_zero which is as vanilla as it gets. He means mods. So, while this is a late answer, there are dozens of different ways to indeed spawn custom peds (replace or addons) and an infinite number of combinations. However v2 is no longer supported so v3 should be the way to go. Here is an example for any noob coming across this discussion.
// Create the PedPedped;// Determine if the identifier is a string (name) or an enumeration value (PedHash)if(identifierisstringpedName){ped=World.CreatePed(pedName,spawnPosition);}elseif(identifierisPedHashpedHash){ped=World.CreatePed(pedHash,spawnPos…
Replies: 1 comment 4 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
well, you can spawn a ped with any |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
i think by "custom ped"@patryksuu is not referring to peds like player_zero which is as vanilla as it gets. He means mods. So, while this is a late answer, there are dozens of different ways to indeed spawn custom peds (replace or addons) and an infinite number of combinations. However v2 is no longer supported so v3 should be the way to go. Here is an example for any noob coming across this discussion. // Create the PedPedped;// Determine if the identifier is a string (name) or an enumeration value (PedHash)if(identifierisstringpedName){ped=World.CreatePed(pedName,spawnPosition);}elseif(identifierisPedHashpedHash){ped=World.CreatePed(pedHash,spawnPosition);}else{thrownewArgumentException("Identifier must be a string (name) or PedHash.");} |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
i thought my examples explained how to spawn peds with any models good enough, but it appears that@patryksuu thought the snippet provided by@JohnFromGWN explained better. i admit i explained worse this time, i could've explained with non-vanilla model hashes, though it would've been a lot better if@patryksuu told me my snippets hadn't made enough sense to them 🥲 |
BetaWas this translation helpful?Give feedback.
All reactions
-
I don't think there was anything wrong with your answer, I think it was just the question from the OP was more about addon peds. I know you're a much more skilled programmer than I am, or anyone else in the GTA V community, but I'm not sure about your second example. I tried it for fun and it did not work. From my experience, these are the ways to spawn peds, but i'm sure there are more. //Example of addon mod Kira // 4 equivalent examples of vanilla mod Vagos female // Examples of Franklin vanilla player |
BetaWas this translation helpful?Give feedback.
All reactions
-
Oops, my second example was wrong about how to cast literal integers to another integer type that can't exactly represent the target values, where an Also, thank you for cheering me up. |
BetaWas this translation helpful?Give feedback.