Neons - Attach neons with ease! -
Psymetrix - 30.12.2011
Introduction
This include allows you to attach neons to vehicles without any having to bother about finding the right positions.
It uses
THIS list, created by
JernejL, to automatically get the correct positions for the neons.
This may not be 100% accurate for all vehicles, especially boats but as far as I have tested, It's pretty damn close.
Functions
There are two functions.
Код:
AttachNeons( vehicleid, color );
This function allows you to attach neons to a vehicle.
You do not have to give positions as they are stored in the include.
Colors are defined in the include ( or see below ).
Existing neons will be removed from the vehicle before attaching new ones.
Код:
RemoveNeons( vehicleid );
Use this function to remove neons attached using this include.
Both functions return 1 on success, 0 on fail.
Neon Colors
Код:
#define NEON_RED 18647 // RedNeonTube1
#define NEON_BLUE 18648 // BlueNeonTube1
#define NEON_GREEN 18649 // GreenNeonTube1
#define NEON_YELLOW 18650 // YellowNeonTube1
#define NEON_PINK 18651 // PinkNeonTube1
#define NEON_WHITE 18652 // WhiteNeonTube1
Download
Slightly fixed version:
Pastebin.com
It seems that the chassis offsets don't work as well as I first thought.
Example
pawn Код:
COMMAND:attach( playerid, params[] )
{
#pragma unused params
if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
static neons[ 5 ] = {NEON_RED, NEON_GREEN, NEON_BLUE, NEON_WHITE, NEON_YELLOW};
AttachNeons( GetPlayerVehicleID( playerid ), neons[ random( sizeof neons ) ] );
}
else
SendClientMessage( playerid, -1, "You must be driving a vehicle to use this command." );
return 1;
}
COMMAND:remove( playerid, params[] )
{
#pragma unused params
if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
RemoveNeons( GetPlayerVehicleID( playerid ) );
else
SendClientMessage( playerid, -1, "You must be driving a vehicle to use this command." );
return 1;
}
Respuesta: Neons - Attach neons with ease! -
[Nikk] - 30.12.2011
Exelent, , making neons very simple, thanks
Re: Neons - Attach neons with ease! -
Steven82 - 30.12.2011
Cool. Good job man.
Re: Neons - Attach neons with ease! -
DVA - 02.08.2014
AttachObjectToVehicle(
g_NeonObject[ vehicleid ][ 0 ],
vehicleid,
( VehicleData[ arrModel ][ 0 ] / 2 ) - 0.5,
VehicleData[ arrModel ][ 4 ] - VehicleData[ arrModel ][ 4 ], //emm...always 0 here?
VehicleData[ arrModel ][ 5 ] - 0.5,
0.00,
0.00,
0.00 );
Re: Neons - Attach neons with ease! -
iFarbod - 07.08.2014
That's good.
Re: Neons - Attach neons with ease! -
Rafiullah - 12.08.2014
Coool i liked That +
Rep
Respuesta: Neons - Attach neons with ease! -
Su37Erich - 12.08.2014
Great job I'll test it, thank you