ertlflorian1 Posted March 9, 2013 Share Posted March 9, 2013 why it wouldnt work no errors function blabla() fahrhauss = createPed (147, -2460.5966796875, 777.271484375, 35.171875,-90) setTimer (function() setPedControlState(fahrhauss,"crouch", false ) setPedControlState(fahrhauss,"crouch", true ) end, 3000,1) end addEventHandler ("onClientResourceStart", getResourceRootElement(),blabla) Link to comment
ertlflorian1 Posted March 9, 2013 Author Share Posted March 9, 2013 In my meta its as client entered Link to comment
iPrestege Posted March 9, 2013 Share Posted March 9, 2013 Should work but the State it's not good i mean "crouch" try another one and it will work ( ; . Link to comment
Jaysds1 Posted March 9, 2013 Share Posted March 9, 2013 (edited) try this: addEventHandler("OnClientPlayerSpawn",resourceRoot,function() ped = createPed (147, -2460.5966796875, 777.271484375, 35.171875,90) setTimer (setPedControlState,7000,1,ped,"crouch", true) end) EDITED! Edited March 10, 2013 by Guest Link to comment
ertlflorian1 Posted March 9, 2013 Author Share Posted March 9, 2013 It wont work ? I dont know why can somebody check the code? Link to comment
Jaysds1 Posted March 9, 2013 Share Posted March 9, 2013 copy the code again and try it... Link to comment
ertlflorian1 Posted March 10, 2013 Author Share Posted March 10, 2013 Dont work i copyed it again Link to comment
PaiN^ Posted March 10, 2013 Share Posted March 10, 2013 Maybe another part of the code is missing it up, Show your full code .. Link to comment
Jaysds1 Posted March 10, 2013 Share Posted March 10, 2013 (edited) or maybe he doesn't see when the ped crouches because after he stands up... Try my code again, I've made it on when you spawn, the ped crouches. Try spawning as close to the ped! if that doesn't work then try this: addEventHandler("onClientPlayerSpawn",resourceRoot,function() ped = createPed (147, -2460.5966796875, 777.271484375, 35.171875,90) setTimer (setPedControlState,10000,0,ped,"crouch", true) --every 10 secs the ped would crouch end) This code will make the ped continually crouch after 10 secs. EDITED: Noob mistake Thnx TAPL for correcting me!!! Edited March 10, 2013 by Guest Link to comment
TAPL Posted March 10, 2013 Share Posted March 10, 2013 or maybe he doesn't see when the ped crouches because after he stands up...Try my code again, I've made it on when you spawn, the ped crouches. Try spawning as close to the ped! if that doesn't work then try this: addEventHandler("OnClientPlayerSpawn",resourceRoot,function() ped = createPed (147, -2460.5966796875, 777.271484375, 35.171875,90) setTimer (setPedControlState,10000,0,ped,"crouch", true) --every 10 secs the ped would crouch end) This code will make the ped continually crouch after 10 secs. I don't think there an event called "OnClientPlayerSpawn" and can be attached to "resourceRoot"? Link to comment
ertlflorian1 Posted March 10, 2013 Author Share Posted March 10, 2013 This is my full code:( Link to comment
iPrestege Posted March 10, 2013 Share Posted March 10, 2013 The State "crouch" not working good . Link to comment
ertlflorian1 Posted March 10, 2013 Author Share Posted March 10, 2013 Ok when it wouldnt work with crouch then I am looking for an Animation where a Ped is sitting?? Does somebody know such an Animation? Link to comment
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