Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Game.IsControlJustPressed(0, Control.DropWeapon))
- {
- var pos = API.GetOffsetFromEntityInWorldCoords(API.PlayerPedId(), 0f, 2f, 0f);
- // store netId to refer to the entity elsewhere
- var netId = await NetworkEntity.CreateNetworkVehicle(
- VehicleHash.Caddy, pos.X, pos.Y, pos.Z, API.GetEntityHeading(API.PlayerPedId()) + 90f));
- // sample usage of the entity through netId
- API.SetVehicleEngineHealth(API.NetToVeh(netId), 250f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement