AddVehicleComponent Sk

From SA-MP Wiki

Jump to: navigation, search



Description:

Pri použití tejto funkcie si môžete pridávať komponenty do vašeho auta, ktoré ste vytvorili funkciou AddStaticVehicle, AddStaticVehicleEx alebo CreateVehicle. ID komponentov môžete nájsť tu.


Parameters:
(vehicleid, componentid)
vehicleidID vytvoreného vozidla, nie ID modelu vozidla.
componentidID Komponentu ktorý chcete pridať do vašeho vozidla.


Image:32px-Circle-style-warning.png

Important
Note

Ak použijete neexistujúce ID Komponentu, spadne vám hra.


Return Values:

This function does not return any specific values.


new vozidlo;
 
public OnGameModeInit( )
{
    vozidlo = AddStaticVehicle(420,-2482.4937,2242.3936,4.6225,179.3656,6,1); // Taxi
    return 1;
}
 
public OnPlayerEnterVehicle (playerid, vehicleid)
{
    if (vehicleid == vozidlo)
    {
        AddVehicleComponent(vozidlo, 1010); // Nitro
        SendClientMessage(playerid, 0xFFFFFFAA, "Do vašeho Taxi bolo pridané Nitro.");
    }
    return 1;
}

Related Functions

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


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools
In other languages