ertlflorian1 Posted March 9, 2013 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)
iPrestege Posted March 9, 2013 Posted March 9, 2013 Should work but the State it's not good i mean "crouch" try another one and it will work ( ; .
Jaysds1 Posted March 9, 2013 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
ertlflorian1 Posted March 9, 2013 Author Posted March 9, 2013 It wont work ? I dont know why can somebody check the code?
PaiN^ Posted March 10, 2013 Posted March 10, 2013 Maybe another part of the code is missing it up, Show your full code ..
Jaysds1 Posted March 10, 2013 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
TAPL Posted March 10, 2013 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"?
ertlflorian1 Posted March 10, 2013 Author 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?
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