CreateVehicle Sk
From SA-MP Wiki
Description:
Táto funkcia pridáva vozidlá do vašeho Gamemodu-Filterscriptu. Táto funkcia je podobná funkcii AddStaticVehicle
(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)
modelid | Model vozidla. |
Float:X | X-ová súradnica vozidla. |
Float:Y | Y-ová súradnica vozidla. |
Float:Z | Z-ová súradnica vozidla. |
Float:angle | Uhol otočenia vozidla. |
color1 | Hlavná farba vozidla. |
color2 | Vedlajšia farba vozidla. |
respawn_delay | Čas, za ktorý sa auto respawne v sekundách. |
Return Values:
ID vytvoreného vozidla.
public OnGameModeInit( ) { // Do hry pridá Hydru s respawnom do 60 sekúnd. CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60); return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- DestroyVehicle: Destroy a vehicle.
- AddStaticVehicle: Add a static vehicle.
- AddStaticVehicleEx: Add a static vehicle with custom respawn time.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnVehicleSpawn: Called when a vehicle respawns.