AddStaticVehicleEx NL

From SA-MP Wiki

Jump to: navigation, search


AddStaticVehicle is de functie om een statisch voertuig in de server te plaatsen. Deze functie kan alleen gebruikt worden on OnGameModeInit(). De reden hiervoor is omdat het een statisch voertuig is. Het voertuig wordt eenmalig aangemaakt en daarna voor altijd daar gespawnt. Om voertuigen tijdens het spelen te spawnen gebruik je CreateVehicle


Parameters:
(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay)
modelidHet ModelID van het voertuig.
Float:spawn_XDe X-coordinaat van het voertuig.
Float:spawn_YDe Y-coordinaat van het voertuig.
Float:spawn_ZDe Z-coordinaat van het voertuig.
Float:angleDe richting dat het voertuig op moet 'kijken'.
color1De primaire kleur.
color2De secundaire kleur.
respawn_delayDe tijd voordat het voertuig (als deze onbemand is) respawnt. (-1 is nooit). Deze tijd is in seconden


ReturnsHet ID van het voertuig dat zojuist is aangemaakt


public OnGameModeInit()
{
    // Spawn een Hydra dat na 15 seconden (in onbemande staat) zal respawnen
    AddStaticVehicleEx ( 520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 15 );
 
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools