[Include] Neons - Attach neons with ease!
#1

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;
}
Reply


Messages In This Thread
Neons - Attach neons with ease! - by Psymetrix - 30.12.2011, 19:29
Respuesta: Neons - Attach neons with ease! - by [Nikk] - 30.12.2011, 22:25
Re: Neons - Attach neons with ease! - by Steven82 - 30.12.2011, 22:30
Re: Neons - Attach neons with ease! - by DVA - 02.08.2014, 20:21
Re: Neons - Attach neons with ease! - by iFarbod - 07.08.2014, 08:13
Re: Neons - Attach neons with ease! - by Rafiullah - 12.08.2014, 19:48
Respuesta: Neons - Attach neons with ease! - by Su37Erich - 12.08.2014, 22:09

Forum Jump:


Users browsing this thread: 1 Guest(s)