manawydan Posted March 17, 2013 Posted March 17, 2013 ola, novamente tenho problema com setPedControlState Client addEvent ( "callSetPedControlState", true ) addEventHandler("callSetPedControlState", root, function (thePed, control) setPedControlState( thePed, control, true ) end) server addEvent ( "MissaoP3", true ) addEventHandler ( "MissaoP3", root, function ( ) Maverick = createVehicle(497, -799.13732910156, 2428.3779296875, 157.08525085449) Ada = createPed (263, -795.38226318359, 2423.7541503906, 157.08544921875) setElementModel(Ada, 263) warpPedIntoVehicle ( Ada, Maverick, 0 ) local thePed = Ada local control = "accelerate" triggerClientEvent ( "callSetPedControlState", root ) setElementSyncer ( Ada, true ) end) "Querer não é poder, mas tentar é avançar"!
Anderl Posted March 17, 2013 Posted March 17, 2013 Então e dizer qual o problema? Não somos bruxos.. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
manawydan Posted March 17, 2013 Author Posted March 17, 2013 o problema foi que o setPedControlState Não funcionou "Querer não é poder, mas tentar é avançar"!
Anderl Posted March 17, 2013 Posted March 17, 2013 Você não está passando quaisquer argumentos para a função do evento, mas você está tentando usar as variáveis "thePed" e "control" que, obviamente, não existem. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
DNL291 Posted March 17, 2013 Posted March 17, 2013 Você não passou os argumentos para o evento, como dito por Anderl. Não precisa definir uma nova variável para o Ped que foi criado. Você esqueceu de fazer isso: triggerClientEvent( "callSetPedControlState", root, Ada, control ) Please do not PM me with scripting related question nor support, use the forums instead.
manawydan Posted March 17, 2013 Author Posted March 17, 2013 não tenho palavras para agradecer! vocês me ajudaram muito. eu tentei de várias maneiras fazer o ped voar. agora posso terminar o script, muito obrigado mesmo. "Querer não é poder, mas tentar é avançar"!
Anderl Posted March 17, 2013 Posted March 17, 2013 De nada. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
DNL291 Posted March 18, 2013 Posted March 18, 2013 De nada. Você também pode colocar a boolean como argumento, para definir o status quando chamar o evento. Please do not PM me with scripting related question nor support, use the forums instead.
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