swag_k_dog Posted October 10, 2016 Posted October 10, 2016 local batped = createPed(30, 2767.5, -1617, 11) setPedRotation(batped, -45) givePedWeapon(batped, 5, 1, true) setPedAnimation(batped, "dildo", "dildo_idle") the ped spawns with his animation but it the "givePedWeapon" line does not work at all. help?
Gravestone Posted October 10, 2016 Posted October 10, 2016 setPedRotation is a deprecated function so you'll have to use setElementRotation instead. And for the weapon not being given, it's actually given, I don't know why it's not visible. I tried it with this server sided code: addCommandHandler("createped", function() batped = createPed(30, 2767.5, -1617, 11) setElementRotation(batped, 0, 0, -45) setPedAnimation(batped, "dildo", "dildo_idle") giveWeapon(batped, 5, 1, true) end ) addCommandHandler("wp", function() outputChatBox(getPedWeapon(batped)) end ) It outputs ID 5 i.e baseball bat. An MTA bug perhaps? Clan war system http://sh.st/7r4nI
swag_k_dog Posted October 10, 2016 Author Posted October 10, 2016 4 minutes ago, Gravestone said: setPedRotation is a deprecated function so you'll have to use setElementRotation instead. And for the weapon not being given, it's actually given, I don't know why it's not visible. I tried it with this server sided code: addCommandHandler("createped", function() batped = createPed(30, 2767.5, -1617, 11) setElementRotation(batped, 0, 0, -45) setPedAnimation(batped, "dildo", "dildo_idle") giveWeapon(batped, 5, 1, true) end ) addCommandHandler("wp", function() outputChatBox(getPedWeapon(batped)) end ) It outputs ID 5 i.e baseball bat. An MTA bug perhaps? here is a pic of the ped being spawned without a weapon:
Gravestone Posted October 10, 2016 Posted October 10, 2016 Read my post again. 6 minutes ago, Gravestone said: it's actually given, I don't know why it's not visible. I tried it with this server sided code: Clan war system http://sh.st/7r4nI
Walid Posted October 10, 2016 Posted October 10, 2016 it's very easy just added a timer that's all addCommandHandler("createped", function() local batped = createPed(30, 1210.6025390625, 1343.564453125, 6.734375) setElementRotation(batped, 0, 0, -45) setPedAnimation(batped, "dildo", "dildo_idle") setTimer(giveWeapon,500,1,batped, 5, 1, true) end ) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
swag_k_dog Posted October 10, 2016 Author Posted October 10, 2016 (edited) 16 minutes ago, Walid said: it's very easy just added a timer that's all addCommandHandler("createped", function() local batped = createPed(30, 1210.6025390625, 1343.564453125, 6.734375) setElementRotation(batped, 0, 0, -45) setPedAnimation(batped, "dildo", "dildo_idle") setTimer(giveWeapon,500,1,batped, 5, 1, true) end ) still doesnt work, I just tried Edit: nevermind its "givePedWeapon" not "giveWeapon". got it!!! thanks Edited October 10, 2016 by swag_k_dog
swag_k_dog Posted October 10, 2016 Author Posted October 10, 2016 (edited) X Edited October 10, 2016 by swag_k_dog
Walid Posted October 10, 2016 Posted October 10, 2016 (edited) 1 hour ago, swag_k_dog said: still doesnt work, I just tried Edit: nevermind its "givePedWeapon" not "giveWeapon". got it!!! thanks Use my code server side . givePedWeapon: Client side function. giveWeapon: Server side function. Edited October 10, 2016 by Walid 1 Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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