Jump to content

sePedControlState


Recommended Posts

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) 

Link to comment

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 ) 

Link to comment

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...