|
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
|
08-19-2019
, 19:01
Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
|
#3
|
Natives for developers:- Requests and suggestions are welcome.
Spoiler
PHP Code:
/** * Library is registered as: "neon_beams" */
/** * Returns the surface vPos and vAng of where the provided client is looking. * * @param userid client userid to use their crosshair position * @param vAng Angle float vector in radians * @param vPos Position float vector * * @return True on success, false if invalid position */ native bool NeonBeams_SetupPos(int userid, float vAng[3], float vPos[3]);
/** * Loads an ArrayList of formatted data at the specified angle and position. * Array format is the same as the preset configs format. * * Format: * "<int RGB color> <float vPos[0]> <float vPos[1]> <float vPos[2]> <float vPos2[0]> <float vPos2[1]> <float vPos2[2]>" * Color: Value 0 = any random RGB. 1-50 are reserved for particles. Any number greater is the RGB beam color. * Example: * PushArrayString(aHand, "255 -0.002937 180.852661 -66.920837 0.017084 133.275146 -63.721679"); * * @param ArrayList Array list handle to load from * @param vAng Angle float vector in radians * @param vPos Position float vector * * @return True on success, false if something went wrong, or plugin turned off */ native bool NeonBeams_LoadArray(ArrayList aHand, float vAng[3], float vPos[3]);
/** * Load a temporary preset by name at specified position. * * @param name[64] Name of preset to load * @param vAng Angle float vector in radians * @param vPos Position float vector * * @return True on success, false if no preset was found, or plugin turned off */ native bool NeonBeams_TempPre(char name[64], float vAng[3], float vPos[3]);
/** * Display a temporary beam between specified positions. * * @param color Decimal RGB color code (or reversed RGB Hex eg: BGR: 0x0000FF is red and 0xFF0000 is blue) * @param vPos1 Starting vector position * @param vPos2 Ending vector position * @param time How long beams last, 0.0 = until map change * * @return True on success, false if plugin turned off */ native bool NeonBeams_TempMap(int color, float vPos1[3], float vPos2[3], float time = 0.0);
/** * Display and save a beam to the map between specified positions. * * @param color Decimal RGB color code (or reversed RGB Hex eg: BGR: 0x0000FF (255) is red and 0xFF0000 (16711680) is blue) * @param vPos1 Starting vector position * @param vPos2 Ending vector position * * @return True on success, false if plugin turned off */ native bool NeonBeams_SaveMap(int color, float vPos1[3], float vPos2[3]);
Example Demo Plugins (found in the .zip):
__________________
|
|
|
|