RU/warpPedIntoVehicle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
XRAY (talk | contribs)
No edit summary
XRAY (talk | contribs)
No edit summary
Line 2: Line 2:
{{RU/Server function}}
{{RU/Server function}}
{{translate}}
{{translate}}
Эта функция телепортирует педа в указанyый транспорт, не используя при этом анимаций.
Эта функция перемещает педа в указанyый транспорт, не используя при этом анимаций.


==Syntax==  
==Syntax==  
Line 10: Line 10:


===Required Arguments===  
===Required Arguments===  
*'''thePed:''' The ped which you wish to force inside the vehicle
*'''thePed:''' Пед которого вы хотите переместить в транспортное средство
*'''theVehicle:''' The vehicle you wish to force the ped into
*'''theVehicle:''' Транспортное средство в которое вы хотите переместить педа


===Optional Arguments===  
===Optional Arguments===  

Revision as of 14:28, 20 July 2010

This page requires local translation. If page will remain not translated in reasonable period of time it would be deleted.
After translating the page completely, please remove the ‎{{translate}}‎ tag from the page.

Эта функция перемещает педа в указанyый транспорт, не используя при этом анимаций.

Syntax

bool warpPedIntoVehicle ( ped thePed, vehicle theVehicle, [ int seat=0 ] )          

Required Arguments

  • thePed: Пед которого вы хотите переместить в транспортное средство
  • theVehicle: Транспортное средство в которое вы хотите переместить педа

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • seat: An integer representing the seat ID. 0 represents the driver, any higher represent passenger seats.

Returns

Returns true if the operation is successful, false otherwise.

Example

This example creates a vehicle and warps a ped inside immediately.

function setupForRace ( )
    local RacerPed = createPed ( 252, 0, 0, 3 )
    local RaceVehicle = createVehicle ( 411, 4, 0, 3 )            -- create a vehicle.
    warpPedIntoVehicle ( RacerPed, RaceVehicle )                  -- warp the ped straight into the vehicle
end
addCommandHandler ( "startrace", setupForRace )                   -- add a command to start race

Смотрите также