FANDOM


Ovaj callback dodaje neku kompnentu na odredjeno vozilo.

Parametri Edit

(vehicleid, componentid)
vehicleid - ID vozila koje je modifikovano
componentid - ID komponente koja se dodaje na vozilo
return
0 - komponenta nije dodana jer vozilo ne postoji
1 - komponenta je dodana na vozilo


Primer Edit

new gTAXI;
 
public OnGameModeInit()
{
    gTAXI = AddStaticVehicle(420, -2482.4937, 2242.3936, 4.6225, 179.3656, 6, 1); // Taxi
    return 1;
}
 
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
        if (GetPlayerVehicleID(playerid) == gTAXI)
        {
            AddVehicleComponent(gTAXI, 1010); // Nitro
            SendClientMessage(playerid, 0xFFFFFFAA, "Nitro je dodan u Taxi Vozilo.");
        }
    }
    return 1;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.