Lorder Posted February 28, 2017 Posted February 28, 2017 I am having trouble with the code, I want to give all of them a separate skin, and they all make separate animations, and when I give the command to animate one, they all do the same animation @Fist peds = { {28,29,30}, } pedAnim = { {"crc","crack","crckidle2"}, } function pedArmy() for _,v in ipairs(peds) do local rot,x,y,z = unpack(v); createPed(rot, -1302, 2508, 87) createPed(rot, -1305, 2515, 87) createPed(rot, -1307, 2528, 87) createPed(rot, -1320, 2512, 92) createPed(rot, -1311, 2522, 89) end end addCommandHandler("spawnpeds",pedArmy) function doAnim(source,cmd,anim) if (anim) then for _,v in ipairs(pedAnim) do local animName,animBlock,actualAnimName = unpack(v); if (tostring(anim) == animName) then for _,p in ipairs(getElementsByType("ped")) do setPedAnimation(p,animBlock,actualAnimName) end end end end end addCommandHandler("action",doAnim)
NeXuS™ Posted February 28, 2017 Posted February 28, 2017 Hey Lorder, Can you describe a bit more about your project? Also, this script makes no sense :D.
Lorder Posted February 28, 2017 Author Posted February 28, 2017 1 hour ago, Patrik91 said: Hey Lorder, Projeniz hakkında biraz daha açıklayabilir misiniz? Ayrıca, bu komut mantıklı değildir: D. My english is not very good I have to get them to do another animation, they have to wear another costume
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now