Vehicle::isStreamedFor: Difference between revisions
(Created page with "{{ServersideJsFunction}} {{JSContainer| ===Required Params=== *'''player''' {{RageType|Player}} ===Return value=== *''' {{RageType|void}} ''' ==Syntax== <syntaxhighlight lang="javascript"> vehicle.isStreamedFor(player); </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.at(0); //find vehicle with id 0; const player = mp.players.at(13); //find player with id 13 if (vehicle.isStreamedFor(player)) { console.log(`Vehicle...") |
No edit summary |
||
| Line 29: | Line 29: | ||
}} | }} | ||
==See also== | ==See also== | ||
{{ | {{Vehicle_definition}} | ||
[[Category:Vehicle API]] | [[Category:Vehicle API]] | ||
[[Category:Serverside API]] | [[Category:Serverside API]] | ||
[[Category:Server-side Function]] | [[Category:Server-side Function]] | ||
Latest revision as of 08:30, 29 May 2024
Server-Side Function
JavaScript Syntax
Required Params
- player Player
Return value
- void
Syntax
vehicle.isStreamedFor(player);
Example
const vehicle = mp.vehicles.at(0); //find vehicle with id 0;
const player = mp.players.at(13); //find player with id 13
if (vehicle.isStreamedFor(player)) {
console.log(`Vehicle id ${vehicle.id} is streamed in for player id ${player.id}`)
} else {
console.log(`Vehicle id ${vehicle.id} is not streamed in for player id ${player.id}`)
}
See also
- Functions
- Vehicle::Vehicle
- Vehicle::destroy
- Vehicle::explode
- Vehicle::getColor
- Vehicle::getColorRGB
- Vehicle::getExtra
- Vehicle::getMod
- Vehicle::getNeonColor
- Vehicle::getOccupant
- Vehicle::getOccupants
- Vehicle::getPaint
- Vehicle::isStreamed
- Vehicle::isStreamedFor
- Vehicle::repair
- Vehicle::setColor
- Vehicle::setColorRGB
- Vehicle::setExtra
- Vehicle::setMod
- Vehicle::setNeonColor
- Vehicle::setOccupant
- Vehicle::setPaint
- Vehicle::spawn
- Entity::destroy
- Entity::dist
- Entity::distSquared
- Entity::getVariable
- Entity::setVariable
- Entity::setVariables
- Properties
- Vehicle::bodyHealth
- Vehicle::brake
- Vehicle::dashboardColor
- Vehicle::dead
- Vehicle::engine
- Vehicle::engineHealth
- Vehicle::extras
- Vehicle::highbeams
- Vehicle::horn
- Vehicle::livery
- Vehicle::locked
- Vehicle::movable
- Vehicle::mods
- Vehicle::neonEnabled
- Vehicle::numberPlate
- Vehicle::numberPlateType
- Vehicle::pearlescentColor
- Vehicle::rocketBoost
- Vehicle::rotation
- Vehicle::siren
- Vehicle::steerAngle
- Vehicle::streamedPlayers
- Vehicle::taxiLights
- Vehicle::trailer
- Vehicle::traileredBy
- Vehicle::trimColor
- Vehicle::velocity
- Vehicle::windowTint
- Vehicle::wheelColor
- Vehicle::wheelType
- Entity::alpha
- Entity::data
- Entity::dimension
- Entity::id
- Entity::model
- Entity::position
- Entity::type