Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void AttachToVehicle(CallType type, ref ParamsReadContext ctx, ref PlayerIdentity sender, ref Object target)
- {
- Param1< vector > data;
- if ( !ctx.Read( data ) ) return;
- if ( type == CallType.Server )
- {
- PlayerBase player = PlayerBase.Cast( SyncPlayerList.GetPlayerFromPID( sender.GetPlayerId() ) );
- if ( player == NULL )
- return;
- CarScript car = CarScript.Cast( target );
- if ( car == NULL )
- return;
- if ( car.TeleportsInside() )
- {
- car.AttachAt( player, data.param1 );
- }
- }
- }
- void FixPlayerClientSync(CallType type, ref ParamsReadContext ctx, ref PlayerIdentity sender, ref Object target)
- {
- if ( type == CallType.Client )
- {
- GetGame().GetPlayer().StartCommand_Move();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement