Jump to content

sePedControlState


Recommended Posts

Posted

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) 

Posted

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.

Posted

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 ) 

Posted

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.

:D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...