[SOLVED] Drawable Variatons and other stuff

Hi there! Queston for developers:

Are you planning to add some stuff like this:

  • GetPedDrawableVariation
  • GetNumberOfPedDrawableVariations
  • SetPedComponentVariation
  • GetPedHeadBlendData
  • UpdatePedHeadBlendData

and etc. for setting up ped components and character creation, in future updates?
I am nearly at public release of player skin selector. But these natives (in list above) makes my server stuck

P.S. Sorry for my bad English.

Waiting for respond. Thank you.

@Developer

Hey!

What do you mean by it getting ‘stuck’? These functions should work, I’ve not tested them, could you share some example code that shows them breaking?

Also were you the owner of this server on CitizenMP:IV with the job to carry boxes on a dock?

This was the most fun activity ever! Good to see you here!

Yes, it is me. Thank you!
Never thought that boxes will be remembered by community xD

Here is my code:

if IsControlJustPressed(1, 202) then
local headnow = GetPedDrawableVariation(GetPlayerPed(-1), 0) – head now
local head = GetNumberOfPedDrawableVariations(GetPlayerPed(-1), 0) – head
local torso = GetNumberOfPedDrawableVariations(GetPlayerPed(-1), 3) – torso
TriggerEvent(‘chatMessage’, ‘’, {0, 0, 0}, 'Head Now: '…headnow)
TriggerEvent(‘chatMessage’, ‘’, {0, 0, 0}, 'Head: '…head)
TriggerEvent(‘chatMessage’, ‘’, {0, 0, 0}, 'Torso: '…torso)
end

And if i press the key - other keys (commands) are stop working… Everything is stop working!
I can chat, die and respawn, living the American dream, but keys is not working after i run this code. There is no tags, so i can show you screenshot (the problem is in selected text):

by the way, i know how it works (i mean how to make skin selector). For example - this is my citizen:fx (gta 4) playereditor:

and, yes: @Developer i choose you!

@MarkViolla said in Drawable Variatons and other stuff:

Yes, it is me. Thank you!
Never thought that boxes will be remembered by community xD

Boxes are the way of living!

@MarkViolla said in Drawable Variatons and other stuff:

There is no tags

Use 3 backticks (```) like follows:

hi!
code     block!

@MarkViolla said in Drawable Variatons and other stuff:

And if i press the key - other keys (commands) are stop working… Everything is stop working!

What does the log say - any Lua errors? This is similar to using DebugView back on FX:IV.

My guess is these functions returned 0 which gets converted to false and then adding to a string leads to this error:

> 'a' .. a
stdin:1: attempt to concatenate a boolean value (global 'a')

… which is because results get returned using _r in natives.lua, and not also _ri, so you need to be aware that this may return false and use tostring(headnow)!

@leaf oooooh yeah! Thank you, friend! now i got it. i was set my skin to default variation (with SetPedDefaultComponentVariation) and script returns “false” instead of 0, if the variation is 0.
Now work in progress, and i try to blend some skins. To make Barbara with big titties and Stephanie who sucks like a vacuum.
On this screenshot below - daughter of Nico and Nico. Just like fathers. Good girl.

Looks scary as shit :wink: great progress.

nicely done hope to see some more good work :slight_smile: