Neon bug -.- [rep+1]
#6

Код:
new Neon[ MAX_VEHICLES ] = { -1, ... };

CMD:neon( playerid, params[ ] )
{
    Neon[ GetPlayerVehicleID( playerid ) ] = CreateObject( ... );
    AttachObjectToVehicle( Neon[ GetPlayerVehicleID( playerid ) ] ), GetPlayerVehicleID( playerid ), ... );
    return 1;
}

public OnVehicleSpawn( vehicleid )
{
    if( Neon[ vehicleid ] != -1 )
        DestroyObject( Neon[ vehicleid ] ), Neon[ vehicleid ] = -1;

    return 1;
}
If you want more neons per vehicle, use Neon[ vehicleid ][ 0, 1, 2, 3 ... ] and variable as new Neon[ MAX_VEHICLES ][ How_many_neons ].

I hope you get it.
Reply


Messages In This Thread
Neon bug -.- [rep+1] - by ProdrifterX - 11.03.2012, 12:07
Re: Neon bug -.- [rep+1] - by Palaa - 11.03.2012, 12:11
Re: Neon bug -.- [rep+1] - by IstuntmanI - 11.03.2012, 12:13
Re: Neon bug -.- [rep+1] - by ProdrifterX - 11.03.2012, 12:14
Re: Neon bug -.- [rep+1] - by ProdrifterX - 11.03.2012, 12:18
Re: Neon bug -.- [rep+1] - by IstuntmanI - 11.03.2012, 12:23

Forum Jump:


Users browsing this thread: 2 Guest(s)