[[sanScript(JAVACODE)]]
[[TOC]]
== script_blips ==
[[sanScript(FUNC BLIP_INDEX #CREATE_BLIP_FOR_ENTITY#ENTITY_INDEX entity, bool isEnemy = FALSE# PURPOSE:
Creates and sets the scale and colour of a vehicle blip.
PARAMS:
vehicle - Vehicle requiring blip.
isEnemyVehicle - sets blip colour red if enemy vehicle
Blip Index.
RETURNS:
)]]
[[sanScript(FUNC blip_index #CREATE_BLIP_FOR_VEHICLE#VEHICLE_INDEX vehicle, bool isEnemyVehicle=FALSE#)]]
[[sanScript(FUNC blip_index #CREATE_BLIP_FOR_PED#PED_INDEX ped, bool isEnemyPed=FALSE# PURPOSE:
Creates and sets the scale and colour of a ped blip.
PARAMS:
ped - Ped requiring blip.
isEnemyPed - Sets blip red if enemy ped
Blip Index.
RETURNS:
)]]
[[sanScript(FUNC blip_index #CREATE_BLIP_FOR_COORD#VECTOR vecCoors, bool setBlipRoute=FALSE# PURPOSE:
Creates and sets the scale and colour of a coord blip.
PARAMS:
vecCoors - Coords requiring blip.
setBlipRoute - creates a satNav route for this blip
Blip Index.
RETURNS:
)]]
[[sanScript(FUNC blip_index #CREATE_BLIP_FOR_OBJECT#OBJECT_INDEX object# PURPOSE:
Creates and sets the scale and colour of an object blip.
PARAMS:
object - Object requiring blip.
Blip Index.
RETURNS:
)]]
[[sanScript(FUNC blip_index #CREATE_BLIP_FOR_PICKUP#PICKUP_INDEX pickup# PURPOSE:
Creates and sets the scale and colour of a pickup blip.
PARAMS:
pickup - Pickup requiring blip.
Blip Index.
RETURNS:
)]]
[[sanScript(FUNC BLIP_INDEX #CREATE_AMBIENT_BLIP_INITIAL_ENTITY#ENTITY_INDEX anEntity# PURPOSE:
Creates the initial sprite blip when approaching the event
PARAMS:
anEntity - The entity the blip is attached to
RETURNS:
)]]
[[sanScript(FUNC BLIP_INDEX #CREATE_AMBIENT_BLIP_INITIAL_COORD#VECTOR vecCoord# PURPOSE:
Creates the initial sprite blip when approaching the event
PARAMS:
vecCoord - The coordinate the blip should be at
RETURNS:
)]]
[[sanScript(FUNC BLIP_INDEX #CREATE_AMBIENT_BLIP_FOR_VEHICLE#VEHICLE_INDEX vehicle, BOOL IsEnemyVehicle = FALSE#)]]
[[sanScript(FUNC BLIP_INDEX #CREATE_AMBIENT_BLIP_FOR_PED#PED_INDEX ped, BOOL IsEnemyPed = FALSE#)]]
[[sanScript(FUNC BLIP_INDEX #CREATE_AMBIENT_BLIP_FOR_COORD#VECTOR vecCoord, BOOL setBlipRoute = FALSE#)]]
[[sanScript(FUNC BLIP_INDEX #CREATE_AMBIENT_BLIP_FOR_OBJECT#OBJECT_INDEX anObject#)]]
== script_buttons ==
[[sanScript(FUNC BOOL #IS_MENU_ACCEPT_BUTTON_PRESSED## PURPOSE: Checks to see if player is currently pressing the menu accept
RETURNS: TRUE if the player is pressing the button, FALSE if they are not
)]]
[[sanScript(FUNC BOOL #IS_MENU_ACCEPT_BUTTON_JUST_PRESSED## PURPOSE: Checks to see if player has just pressed the menu accept button
RETURNS: TRUE if the player has just pressed the button, FALSE if they have not
)]]
[[sanScript(FUNC BOOL #IS_MENU_DECLINE_BUTTON_PRESSED## PURPOSE: Checks to see if player is currently pressing the menu decline
RETURNS: TRUE if the player is pressing the button, FALSE if they are not
)]]
[[sanScript(FUNC BOOL #IS_MENU_DECLINE_BUTTON_JUST_PRESSED## PURPOSE: Checks to see if player has just pressed the menu decline button
RETURNS: TRUE if the player has just pressed the button, FALSE if they have not
)]]
[[sanScript(FUNC BOOL #IS_CUTSCENE_SKIP_BUTTON_PRESSED## PURPOSE: Checks to see if player is pressing the cutscene skip button
RETURNS: TRUE if the player is pressing the button, FALSE if they are not
)]]
[[sanScript(FUNC BOOL #IS_CUTSCENE_SKIP_BUTTON_JUST_PRESSED## PURPOSE: Checks to see if player has just pressed the cutscene skip button
RETURNS: TRUE if the player has just pressed the button, FALSE if they have not
)]]
[[sanScript(FUNC BOOL #IS_CUTSCENE_SKIP_BUTTON_JUST_PRESSED_WITH_DELAY#INT skipDelay = CUTSCENE_SKIP_DELAY# PURPOSE: Checks to see if player has just pressed the cutscene skip button after a short delay. Avoiding accidental cutscene skips.
RETURNS: TRUE if the player has just pressed the button, FALSE if they have not
)]]
== script_camera ==
[[sanScript(FUNC CAMERA_INDEX #GET_GAME_CAMERA_COPY## PURPOSE:
Grabs pertinent values from the game camera, sets up a new scripted camera with this (for manipulation)
The new camera index.
RETURNS:
)]]
== script_clock ==
[[sanScript(PROC #Clear_TimeOfDay#TIMEOFDAY ¶mTimeOfDay# PURPOSE: Clears a timeofday struct.
RETURN PARAM: paramTimeOfDay The TIMEOFDAY struct being cleared
NOTES: Setting both INT parts of the struct to 0. This is fine because for a date the 'day' part
needs to be between 1 and 31 so a value of 0 for the storedTime creates an illegal
date/time combo.
)]]
[[sanScript(FUNC INT #GET_NUMBER_OF_DAYS_IN_MONTH#MONTH_OF_YEAR eMonth, INT iYear# PURPOSE: Calculates the number of days in a given month. Takes into account leap years.
INPUT PARAMS: eMonth The month as a MONTH_OF_YEAR enum.
iYear The year the month is in.
RETURNS: The number of days in the specified month.
)]]
[[sanScript(FUNC INT #GET_TIMEOFDAY_YEAR#TIMEOFDAY sTimeOfDay#The year stored in that TIMEOFDAY
RETURNS:
)]]
[[sanScript(FUNC INT #GET_TIMEOFDAY_MONTH#TIMEOFDAY sTimeOfDay#The month that the passed in TOD has.
NOTE: TIMEOFDAY IS 0-11 (Jen-Dec), JUST LIKE MONTH_OF_YEAR!
RETURNS:
)]]
[[sanScript(FUNC INT #GET_TIMEOFDAY_DAY#TIMEOFDAY sTimeOfDay#The day stored in that TIMEOFDAY
RETURNS:
)]]
[[sanScript(FUNC INT #GET_TIMEOFDAY_HOUR#TIMEOFDAY sTimeOfDay#The hour stored in that TIMEOFDAY
RETURNS:
)]]
[[sanScript(FUNC INT #GET_TIMEOFDAY_MINUTE#TIMEOFDAY sTimeOfDay#The minute stored in that TIMEOFDAY
RETURNS:
)]]
[[sanScript(FUNC INT #GET_TIMEOFDAY_SECOND#TIMEOFDAY sTimeOfDay#The second stored in that TIMEOFDAY
RETURNS:
)]]
[[sanScript(FUNC TIMEOFDAY #GET_CURRENT_TIMEOFDAY##Returns the current Time of Day.
RETURNS:
)]]
[[sanScript(PROC #SET_TIMEOFDAY_SECOND#TIMEOFDAY &sTimeOfDay, INT iSecond# PURPOSE:
Sets the second value of the passed in time of day.
)]]
[[sanScript(PROC #SET_TIMEOFDAY_MINUTE#TIMEOFDAY &sTimeOfDay, INT iMinute# PURPOSE:
Sets the minute value of the passed in time of day.
)]]
[[sanScript(PROC #SET_TIMEOFDAY_HOUR#TIMEOFDAY &sTimeOfDay, INT iHour# PURPOSE:
Sets the hour value of the passed in time of day.
)]]
[[sanScript(PROC #SET_TIMEOFDAY_DAY#TIMEOFDAY &sTimeOfDay, INT iDay# PURPOSE:
Sets the day value of the passed in time of day.
)]]
[[sanScript(PROC #SET_TIMEOFDAY_MONTH#TIMEOFDAY &sTimeOfDay, INT iMonth# PURPOSE:
Sets the month value of the passed in time of day.
)]]
[[sanScript(PROC #SET_TIMEOFDAY_YEAR#TIMEOFDAY &sTimeOfDay, INT iYear# PURPOSE:
Sets the year value of the passed in time of day.
)]]
[[sanScript(PROC #SET_TIMEOFDAY#TIMEOFDAY &sTimeOfDay, INT iSecond, INT iMinute, INT iHour, INT iDay, INT iMonth, INT iYear# PURPOSE:
Completely configures all values of a time of day struct.
)]]
[[sanScript(PROC #ADD_TIME_TO_TIMEOFDAY#TIMEOFDAY & sTimeOfDay, INT iAddSeconds = 0,INT iAddMinutes = 0, INT iAddHours = 0, INT iAddDays = 0, INT iAddMonths = 0, INT iAddYears = 0# PURPOSE:
Pass in a TIMEOFDAY, and the function will add the (also passed in) seconds, minutes, hours, days, months and years to it that have been specified.
Returned via the referenced TIMEOFDAY passed in.
)]]
[[sanScript(PROC #ADD_TIMEOFDAY_TO_TIMEOFDAY#TIMEOFDAY &sTimeOfDay, TIMEOFDAY sTimeOfDayToAdd# PURPOSE:
Adds the time stored in one TIMEOFDAY struct to another TIMEOFDAY struct.
)]]
[[sanScript(FUNC BOOL #IS_TIMEOFDAY_AFTER_TIMEOFDAY#TIMEOFDAY sTOD1, TIMEOFDAY sTOD2# PURPOSE:
Checks to see if Timeofday 1 is later than time of day 2.
TRUE if TOD1 is later than TOD2, FALSE if not.
RETURNS:
)]]
[[sanScript(FUNC BOOL #IS_NOW_AFTER_TIMEOFDAY#TIMEOFDAY sTimeOfDay# PURPOSE:
Tried to be descriptive with the function name, but it checks to see if our current time right now is AFTER the passed in TIMEOFDAY
TRUE if the current time is later than the passed in time.
RETURNS:
)]]
[[sanScript(PROC #PRINT_TIMEOFDAY#TIMEOFDAY sTimeOfDay# PURPOSE:
Prints the time and date stored in the TIMEOFDAY.
)]]
== script_debug ==
[[sanScript(FUNC STRING #GET_STRING_FROM_MILISECONDS#INT ms# PURPOSE: a string of the time in miliseconds (in the format 11:11:1111)
PARAMS:
ms - Time in ms
AUTHOR: alwyn.roberts@rockstarnorth.com
RETURNS: a string of the time in miliseconds (in the format 11:11:1111
)]]
[[sanScript(FUNC STRING #GET_STRING_FROM_FLOAT#FLOAT f, INT decimal_places = 4# PURPOSE: Returns the float passed as a string to 4 decimal places.
PARAMS:
f - A float, +ve or -ve.
AUTHOR: alwyn.roberts@rockstarnorth.com
RETURNS: a string of the float passed.
)]]
[[sanScript(PROC #DISPLAY_PLACEHOLDER_TEXT#STRING strText, BOOL b_fade_in_after = TRUE# PURPOSE : temp stuff until the mocap rolls in
)]]
[[sanScript( PROC #OUTPUT_DEBUG_CAM_RELATIVE_TO_VEHICLE#VEHICLE_INDEX veh = NULL# PURPOSE:
Converts the current position and rotation of the debug cam into an attach and point offset relative to a given vehicle.
This is useful for quickly creating cameras that will be attached to/pointed at vehicles.
PARAMS:
veh - The vehicle to attach to and point at. If NULL, the nearest vehicle will be used
)]]
[[sanScript( PROC #OUTPUT_DEBUG_CAM_RELATIVE_TO_ENTITY#ENTITY_INDEX entity# PURPOSE:
Converts the current position and rotation of the debug cam into an attach and point offset relative to a given entity.
This is useful for quickly creating cameras that will be attached to/pointed at entities.
PARAMS:
entity - The entity to attach to and point at.
)]]
[[sanScript(PROC #DUMMY_REFERENCE_STRING#STRING dummyText# PURPOSE : References a string to fool the compiler
)]]
[[sanScript(PROC #DUMMY_REFERENCE_BOOL#BOOL dummyBOOL# PURPOSE : References a bool to fool the compiler
)]]
[[sanScript(PROC #DUMMY_REFERENCE_INT#INT dummyINT# PURPOSE : References an integer to fool the compiler
)]]
[[sanScript(PROC #DUMMY_REFERENCE_FLOAT#FLOAT dummyFLOAT# PURPOSE : References a float to fool the compiler
)]]
[[sanScript(PROC #DUMMY_REFERENCE_VECTOR#VECTOR dummyVECTOR# PURPOSE : References a vector to fool the compiler
)]]
[[sanScript(PROC #DUMMY_REFERENCE_PICKUP#PICKUP_INDEX dummyPICKUP#PURPOSE : References a pickup to fool the compiler
)]]
== script_maths ==
[[sanScript(PROC #SET_BITMASK#INT &iBitField, INT iBitMask# PURPOSE: Sets the bit passed in the integer bitfield (the bit is set to 1 - TRUE). For the bit number, use one of the VALUE constants: BIT0 to BIT31.
PARAMS:
iBitField - bitfield you want to set
iBitValue - bit to set in the bitfield. Can take multiple bits or'd together with |
)]]
[[sanScript(PROC #CLEAR_BITMASK#INT &iBitField, INT iBitMask# PURPOSE: Clears the bit passed in the integer bitfield (the bit is set to 0 - FALSE). For the bit number, use one of the VALUE constants: BIT0 to BIT31.
PARAMS:
iBitField - bitfield you want to clear
iBitValue - bit to set in the bitfield. Can take multiple bits or'd together with |
)]]
[[sanScript(FUNC BOOL #IS_BITMASK_SET#INT iBitField, INT iBitMask# PURPOSE: Returns TRUE if the bit passed is set in the integer bitfield. For the bit number, use one of the VALUE constants: BIT0 to BIT31.
PARAMS:
iBitField - bitfield you want to check
iBitValue - bit to set in the bitfield. Can take multiple bits or'd together with |
RETURNS: TRUE if the given mask is set, FALSE otherwise.
)]]
[[sanScript(PROC #SET_BITMASK_AS_ENUM#INT &iBitField, ENUM_TO_INT eBitMask# PURPOSE: Sets the bit passed in the integer bitfield (the bit is set to 1 - TRUE). For the bit number, use an ENUM declared as one of the VALUE constants: BIT0 to BIT31.
iBitField - bitfield you want to set
eBitMask - bit to set in the bitfield. Can take multiple bits or'd together with |. This version takes any ENUM value, rather than an INT
)]]
[[sanScript(PROC #SET_BITMASK_ENUM_AS_ENUM#ENUM_TO_INT &iBitField, ENUM_TO_INT eBitMask# PURPOSE: Sets the bit passed in the integer bitfield (the bit is set to 1 - TRUE). For the both the bitfield and bit number, use an ENUM declared as one of the VALUE constants: BIT0 to BIT31.
iBitField - bitfield you want to set. This version takes any ENUM value, rather than an INT
eBitMask - bit to set in the bitfield. Can take multiple bits or'd together with |. This version takes any ENUM value, rather than an INT
)]]
[[sanScript(PROC #CLEAR_BITMASK_AS_ENUM#INT &iBitField, ENUM_TO_INT eBitMask# PURPOSE: Clears the bit passed in the integer bitfield (the bit is set to 0 - FALSE). For the bit number, use an ENUM declared as one of the VALUE constants: BIT0 to BIT31.
iBitField - bitfield you want to clear
eBitMask - bit to set in the bitfield. Can take multiple bits or'd together with |. This version takes any ENUM value, rather than an INT
)]]
[[sanScript(FUNC BOOL #IS_BITMASK_AS_ENUM_SET#INT iBitField, ENUM_TO_INT eBitMask# PURPOSE: Returns TRUE if the bit passed is set in the integer bitfield. For the bit number, use an ENUM declared as one of the VALUE constants: BIT0 to BIT31.
iBitField - bitfield you want to check
eBitMask - bit to set in the bitfield. Can take multiple bits or'd together with |. This version takes any ENUM value, rather than an INT
RETURNS: TRUE if the given mask is set, FALSE otherwise.
)]]
[[sanScript(FUNC INT #GET_BIT_NUMBER_FROM_INT#INT iNumber# PURPOSE: Returns the BIT equivalent of the integer passed. Example: passing 4 will return 16, or BIT4
PARAMS: iNumber, a value [0,31]. Everything outside of this will return odd results
RETURNS:
)]]
[[sanScript(FUNC INT #GET_INT_FROM_BIT_NUMBER#INT iBit# PURPOSE: Returns the INT equivalent of the BIT NUMBER passed. Example: passing BIT4 or 16 will return 4
PARAMS:
RETURNS:
)]]
[[sanScript(FUNC INT #SUM_BITS#INT bitField# PURPOSE:
Sums the bits in the given bitfield
Number of bits set in the bitfield
RETURNS:
)]]
[[sanScript(FUNC INT #IMIN#INT iVal1, INT iVal2# PURPOSE:
Returns the smaller of the two integer values given
PARAMS:
iVal1 - value 1 to compare
iVal2 - value 2 to compare
iVal1 if iVal1 is less than iVal2, iVal2 otherwise
RETURNS:
)]]
[[sanScript(FUNC INT #IMAX#INT iVal1, INT iVal2# PURPOSE:
Returns the larger of the two integer values given
PARAMS:
iVal1 - value 1 to compare
iVal2 - value 2 to compare
iVal1 if iVal1 is greater than iVal2, iVal2 otherwise
RETURNS:
)]]
[[sanScript(FUNC INT #IMINMAX#INT iValMin, INT iVal, INT iValMax# PURPOSE:
Returns a value with the range of iValMin and iValMax. If iVal is between them, iVal is returned, otherwise it returns one of the range values
PARAMS:
iValMin -
iVal -
iValMax -
RETURNS:
)]]
[[sanScript(FUNC FLOAT #FMIN#FLOAT fVal1, FLOAT fVal2# PURPOSE:
Returns the smaller of the two floating point values given
PARAMS:
fVal1 - value 1 to compare
fVal2 - value 2 to compare
fVal1 if fVal1 is less than fVal2, fVal2 otherwise
RETURNS:
)]]
[[sanScript(FUNC FLOAT #FMAX#FLOAT fVal1, FLOAT fVal2# PURPOSE:
Returns the larger of the two float values given
PARAMS:
fVal1 - value 1 to compare
fVal2 - value 2 to compare
fVal1 if fVal1 is greater than fVal2, fVal2 otherwise
RETURNS:
)]]
[[sanScript(FUNC FLOAT #FMINMAX#FLOAT fValMin, FLOAT fVal, FLOAT fValMax# PURPOSE:
PARAMS:
fValMin -
fVal -
fValMax -
RETURNS:
)]]
[[sanScript(FUNC VECTOR #NORMALISE_VECTOR#VECTOR vec# PURPOSE:
Returns a normalised version of the vector, a vector with a magnitude of one.
PARAMS:
vec - Vector to be normalised.
Normalised vector.
RETURNS:
)]]
[[sanScript(FUNC VECTOR #GET_VECTOR_OF_LENGTH#VECTOR vNonNormalised, FLOAT fDesiredLen# PURPOSE:
Returns a vector scaled to the desired length, with the orientation of the original.
Faster than normalising, then re-scaling a vector.
However, passing in an already-normalised vector will waste calculations; just scale the vector.
PARAMS:
vNonNormalised - Vector to be scaled; if normalized, this function is a waste
fDesiredLen - Desired length
Vector in direction of vNonNormalised with magnitude fDesiredLen
RETURNS:
)]]
[[sanScript(FUNC VECTOR #ROTATE_VECTOR_ABOUT_Z#VECTOR vToRotate, FLOAT fZRot# PURPOSE:
Rotates a vector in 3D space about the world z-axis.
It is assumed here that the axis of rotation passes through the origin.
If you are rotating by an increment of 90 degrees, see next function.
If you are rotating lots of things by the same angle and want to precompute the trig values, see next next function.
PARAMS:
vToRotate - Should be orientation only (should come from origin)
fZRot - Rotation in degrees
Vector rotated locally about the world z axis by fZRot degrees
RETURNS:
)]]
[[sanScript(FUNC VECTOR #ROTATE_VECTOR_ABOUT_Z_ORTHO#VECTOR vToRotate, ROT_STEP eRotation# PURPOSE:
Rotates a vector in 3D space about the world z-axis in 90-degree increments.
Utilises shortcuts for commonly-used 90 degree rotations.
It is assumed here that the axis of rotation passes through the origin.
PARAMS:
vToRotate - Should be orientation only (should come from origin)
eRotation - Rotation by 90, 180, or -90 (270) degrees
Vector rotated locally about the world z axis
Also works for 270
RETURNS:
)]]
[[sanScript(FUNC VECTOR #ROTATE_VECTOR_ABOUT_Z_PRECOMPUTE#VECTOR vToRotate, FLOAT fSin, FLOAT fCos# PURPOSE:
Rotates a vector in 3D space about the world z-axis, using precomputed trig values.
It is assumed here that the axis of rotation passes through the origin.
Useful if you need to rotate lots of vectors by the same angle; avoids recomputing values.
PARAMS:
vToRotate - Should be orientation only (should come from origin)
fSin - sin(rotAngle)
fCos - cos(rotAngle)
Vector rotated locally about the world z axis
RETURNS:
)]]
[[sanScript(FUNC VECTOR #GET_RANDOM_POINT_IN_SPHERE#VECTOR vPos, FLOAT fRadius # PURPOSE:
Gets a random vector within a sphere centred at vPos with a radius of fRadius.
PARAMS:
vPos - The sphere centre
fRadius - Radius of the sphere
A random position vector within fRadius of vPos.
RETURNS:
)]]
[[sanScript(FUNC VECTOR #GET_RANDOM_POINT_IN_DISC#VECTOR vPos, FLOAT fRadius, FLOAT fHeight # PURPOSE:
Gets a random vector within a disc centred at vPos with a radius of fRadius and a height of fHeight.
PARAMS:
vPos - The sphere disc
fRadius - Radius of the disc
fHeight - Height of the disc
A random position vector within fRadius of vPos.
RETURNS:
)]]
[[sanScript(FUNC BOOL #ARE_VECTORS_EQUAL#VECTOR v1, VECTOR v2# PURPOSE:
Checks if two vectors are exactly equal.
PARAMS:
v1 - Vector 1
v2 - Vector 2
TRUE if v1 = v2
RETURNS:
)]]
[[sanScript(FUNC BOOL #ARE_VECTORS_ALMOST_EQUAL#VECTOR v1, VECTOR v2, FLOAT fTolerance = 0.5 # PURPOSE:
Checks if two vectors are almost equal / are within fTolerance of each other.
PARAMS:
v1 - Vector 1
v2 - Vector 2
fTolerance - Tolerance factor.
TRUE if v1 is within fTolerance of v2.
RETURNS:
)]]
[[sanScript(FUNC VECTOR #CROSS_PRODUCT#VECTOR p1, VECTOR p2# PURPOSE: returns the cross product of two passed vectors
the cross product is a binary operation on two vectors in a three-dimensional Euclidean
space that results in another vector which is perpendicular to the plane containing the
two input vectors.
)]]
[[sanScript(FUNC FLOAT #DOT_PRODUCT#VECTOR &v, VECTOR &w# PURPOSE: returns a the dot product from 2 vectors (takes two vectors over the real numbers R and returns a real-valued scalar quantity)
)]]
[[sanScript(FUNC FLOAT #DOT_PRODUCT_XY#VECTOR &v, VECTOR &w# PURPOSE: returns the 2d dot product on the xy plane from 2 vectors
DOES NOT normalize the vectors on the xy plane first! Make sure you know what the return value means!
)]]
[[sanScript(FUNC FLOAT #RAD_TO_DEG#FLOAT fRadians# PURPOSE: Converts radians to degrees.
)]]
[[sanScript(FUNC FLOAT #DEG_TO_RAD#FLOAT fDegrees# PURPOSE: Converts degrees to radians.
)]]
[[sanScript( FUNC FLOAT #CLAMP#FLOAT X, FLOAT Min, FLOAT Max# PURPOSE:
Clamps a desired float value to the nearest specified minimum or maximum value.
PARAMS:
X - float value to be clamped
Min - lower constraint
Max - lower constraint
Clamped value
RETURNS:
)]]
[[sanScript( FUNC INT #CLAMP_INT#INT X, INT Min, INT Max# PURPOSE:
Clamps a desired integer value to the nearest specified minimum or maximum value.
PARAMS:
X - integer value to be clamped
Min - lower constraint
Max - lower constraint
Clamped value
RETURNS:
)]]
[[sanScript( FUNC FLOAT #WRAP#FLOAT X, FLOAT Min, FLOAT Max# PURPOSE:
Wraps a value to a limited area
PARAMS:
x - value to be wrapped
min - lower constraint
max - lower constraint
Wrapped value
RETURNS:
)]]
[[sanScript(FUNC BOOL #IS_PED_IN_ANGLED_AREA_CALCULATED_FROM_SINGLE_FACE#PED_INDEX ped, VECTOR VEC1, VECTOR VEC2, float distance, BOOL check3D = TRUE, PED_TRANSPORT_MODE PTM_MODE = TM_ANY#PURPOSE: Checks if a ped is in an angled area. This calculates the angled area from a single face.
)]]
[[sanScript(PROC #GET_ROTATION_QUATERNION#VECTOR Rotation, FLOAT &QuadX, FLOAT &QuadY, FLOAT &QuadZ, FLOAT &QuadW#PURPOSE: Coverts a standard rotation vector into the values required to perform the same rotation with a quaternion.
INFO: Author - Ben Rollinson
PARAMS NOTES:
Rotation - The rotation vector.
QuadW - The outputted w value for the quaternion rotation.
QuadX - The outputted x value for the quaternion rotation.
QuadY - The outputted y value for the quaternion rotation.
QuadZ - The outputted z value for the quaternion rotation.
)]]
== script_misc ==
[[sanScript(FUNC FLOAT #ROUND_SCREEN_COORD_TO_NEAREST_PIXEL#FLOAT fScreenCoord, BOOL bXCoord# PURPOSE: Rounds a screen X or Y coord to the nearest pixel. Useful for avoiding
visualised rounding errors when drawing moving HUD elements.
)]]
[[sanScript(FUNC ENTITY_INDEX #CONVERT_TO_ENTITY_INDEX#ENTITY_INDEX EntIndex#PURPOSE: If you need to compare a ped, object or vehicle index against an entity index you will need to convert it. More Info..
INFO: This seems a little strange but the compiler doesnt like
if ped_index = entity_index
PARAM NOTES:
)]]
== script_network ==
[[sanScript(FUNC BOOL #IS_NET_PARTICIPANT_INT_ID_VALID#INT iParticipant# PURPOSE:
Checks to see if a player int id is a valid value, is not -ve.
PARAMS:
iPlayer - The player int.
True if the player int is not -ve and less than GET_MAX_NUM_OF_NET_PARTICIPANTS
RETURNS:
)]]
[[sanScript(FUNC PLAYER_INDEX #INVALID_PLAYER_INDEX## PURPOSE: Returns an Invalid Player Index (Currently player index is from 0-31, this sets it to -1. If we were to use NULL it would return 0)
NOTES: Used in Multiplayer
RETURNS: An Invalid Player Index
)]]
[[sanScript(FUNC BOOL #IS_NET_GAME_IN_PROGRESS##)]]
[[sanScript(FUNC BOOL #IS_GAMESPY_ONLINE# #)]]
[[sanScript(FUNC INT #GET_NET_PLAYER_TEAM#PLAYER_INDEX PlayerID#)]]
[[sanScript(FUNC BOOL #IS_NET_PLAYER_OK#PLAYER_INDEX PlayerId, BOOL bCheckPlayerAlive = TRUE, BOOL bCheckPlayerInGameModeMainScriptRunningCase = TRUE# PURPOSE: Check a player is in an OK playing state depending on the passed in variables
)]]
[[sanScript(FUNC INT #GET_THE_NETWORK_TIMER##)]]
[[sanScript(FUNC PARTICIPANT_INDEX #PARTICIPANT_ID##PURPOSE: Returns the participant index
)]]
[[sanScript(FUNC INT #PARTICIPANT_ID_TO_INT##PURPOSE: Convert a participant ID to an INT
)]]
[[sanScript(FUNC INT #NETWORK_PLAYER_ID_TO_INT## PURPOSE: Convert Local players Network Player ID into an int
)]]
[[sanScript(FUNC INT #GBD_SLOT#PLAYER_INDEX PlayerID#PURPOSE: Get a players Global Broadcast slot
)]]
[[sanScript(FUNC network_index #VEH_TO_NET#vehicle_index CarID#PURPOSE: get net id for car
)]]
[[sanScript(FUNC network_index #PED_TO_NET#ped_index PedID#PURPOSE: get net id for ped
)]]
[[sanScript(FUNC network_index #OBJ_TO_NET#object_index ObjID#PURPOSE: get net id for onj
)]]
[[sanScript(FUNC VEHICLE_index #NET_TO_VEH#network_index NetID#PURPOSE: get net id for car
)]]
[[sanScript(FUNC PED_index #NET_TO_PED#network_index NetID#PURPOSE: get net id for ped
)]]
[[sanScript(FUNC OBJECT_index #NET_TO_OBJ#network_index NetID#PURPOSE: get net id for onj
)]]
[[sanScript(FUNC ENTITY_INDEX #NET_TO_ENT#network_index NetID#PURPOSE: get net id for entity
)]]
== script_ped ==
[[sanScript(FUNC BOOL #IS_PED_AT_ANGLED_COORD#PED_INDEX pedIndex,# PURPOSE:
PARAMS:
model_name -
AUTHOR: alwyn.roberts@rockstarnorth.com
COMMENTS:
)]]
[[sanScript(FUNC BOOL #IS_PED_CLOSE_TO_IDEAL_HEADING#PED_INDEX ped, FLOAT idealHeading, FLOAT acceptableRange = 30.0#)]]
[[sanScript(FUNC FLOAT #GET_DISTANCE_BETWEEN_ENTITIES#ENTITY_INDEX entity1, ENTITY_INDEX entity2#)]]
[[sanScript(FUNC FLOAT #GET_DISTANCE_BETWEEN_PEDS#PED_INDEX ped1, PED_INDEX ped2#)]]
== script_player ==
[[sanScript(FUNC PLAYER_INDEX #PLAYER_ID## PURPOSE:
Returns the current player's Player Index
PLAYER_INDEX: PLAYER_INDEX for the current player
NOTES:
Used in Singleplayer
RETURNS:
)]]
[[sanScript(FUNC PED_INDEX #PLAYER_PED_ID## PURPOSE:
Returns the current player's Ped Index
PED_INDEX: PED_INDEX for the current player
NOTES:
Used in Singleplayer
RETURNS:
)]]
[[sanScript(FUNC GROUP_INDEX #PLAYER_GROUP_ID## PURPOSE:
Gets the current player's Group Index
GROUP_INDEX: GROUP_INDEX for the current player
NOTES:
Used in Singleplayer
RETURNS:
)]]
[[sanScript(FUNC BOOL #CAN_PLAYER_START_CUTSCENE## PURPOSE:
Performs various checks to make sure it is safe for the player to start a scripted cutscene.
BOOL TRUE if it is safe to start the cutscene, otherwise FALSE
NOTES:
Also calls the code commands: IS_PLAYER_READY_FOR_CUTSCENE() and CAN_PLAYER_START_MISSION()
RETURNS:
)]]
== script_RayFire ==
[[sanScript(FUNC BOOL #SETUP_RAYFIRE_STRUCT#RayFireSetupStruct &RayFireStruct, STRING RayFireTest#PURPOSE: Adds the model, anim and positional data to the script struct. More info
INFO: This data is stored in a rave xml
PARAM NOTES:
)]]
[[sanScript(PROC #REQUEST_RAY_FIRE_ASSETS#RayFireSetupStruct &RayFireStruct#PURPOSE: Request ray fire assets.
INFO:
PARAM NOTES:
)]]
[[sanScript(FUNC BOOL #HAS_RAY_FIRE_ASSET_LOADED#RayFireSetupStruct &RayFireStruct#PURPOSE: Check that the assets for the rayfire object have load, can use in a asychronous load proc or func.
INFO:
PARAM NOTES:
)]]
[[sanScript(PROC #REQUEST_AND_WAIT_FOR_RAYFIRE_ASSETS_TO_LOAD#RayFireSetupStruct &RayFireStruct#PURPOSE: Requests and waits for the ray fire assets to be loaded. More info.
INFO: This is done synchronously ie everything waits for this to load before continuing.
PARAM NOTES:
)]]
[[sanScript( PROC #CREATE_INITIAL_RAYFIRE_OBJECT_AT_COORD_OVERRIDE#RayFireSetupStruct &RayFireStruct, VECTOR vCoords, VECTOR vRotation#PURPOSE: Create the first ray fire object at the coords given by script. More info...
INFO: This command is usually called when testing the object. It overrides the data that comes from the rayfire data.
if specified otherwise use
PARAM NOTES:
)]]
[[sanScript( PROC #CREATE_INITIAL_RAYFIRE_OBJECT#RayFireSetupStruct &RayFireStruct#INFO:
PARAM NOTES:
PUPROSE: Create the ray fire object at the coords given by the exported data
)]]
[[sanScript( FUNC bool #HAS_RAYFIRE_ANIM_FINISHED#RayFireSetupStruct &RayFireStruct#INFO:
PARAM NOTES:
PUPROSE: Checks that the rayfire anim has finished playing
)]]
[[sanScript( PROC #SET_RAY_FIRE_ASSET_NO_LONGER_NEEDED#RayFireSetupStruct &RayFireStruct#INFO:
PARAM NOTES:
PUPROSE: Sets the rayfire assets to be no longer needed.
)]]
[[sanScript(PROC #DELETE_RAY_FIRE_OBJECTS#RayFireSetupStruct &lstruct#INFO:
PARAM NOTES:
PUPROSE: Delete all my rayfire objects.
)]]
[[sanScript( PROC #PLAY_RAYFIRE_ANIM#RayFireSetupStruct &RayFireStruct #INFO: Play ray fire anim is unlike a normal play anim. It swaps the initial rayfire object with the animated object
at the end of the anim it swaps the final object in place of animated object so PLAY_RAYFIRE_ANIM has to be called
continuously until the HAS_RAYFIRE_ANIM_FINISHED returns true.
PARAM NOTES:
PURPSOE: Plays the object. More info..
)]]
== blip_control_public ==
[[sanScript(FUNC STRING #DEBUG_GET_STRING_NAME_OF_STATIC_BLIP#INT index# PURPOSE:
Returns the enum name of the given blip, works only in debug mode, and for registered blips
PARAMS:
index -
RETURNS:
)]]
[[sanScript(PROC #SET_STATIC_BLIP_ACTIVE_STATE#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Sets the status of the static blib to active/inactive
PARAMS:
name - The name of the static blip
ActivationState - true = active, false = inactive
)]]
[[sanScript(PROC #SET_STATIC_BLIP_VISIBLE_IN_INTERIOR#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Unimplemented, should set a blip to be visible-or not- when the player is indoors
PARAMS:
name - The blip name to act upon
ActivationState - true = show, false = hide
)]]
[[sanScript(PROC #SET_STATIC_BLIP_VISIBLE_IN_EXTERIOR#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Unimplemented, sets wether a blip is shown -or not- when the player is outside
PARAMS:
name - The blip name to act upon
ActivationState - true = show, false = hide
)]]
[[sanScript(PROC #SET_STATIC_BLIP_FLASH_ON_ACTIVE#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Causes a blip to flash for 10 seconds when it is first activated.
PARAMS:
name - The blip to assign this property to
ActivationState - true = flashes, false = default behaviour
)]]
[[sanScript(PROC #SET_STATIC_BLIP_APPEAR_ON_MAP#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Sets if a blip appears on the map screen - or not.
PARAMS:
name - The blip to act upon
ActivationState - true = visible on map screen, false = hidden on map screen
)]]
[[sanScript(PROC #SET_STATIC_BLIP_APPEAR_IN_RADAR#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Sets wether a blip appears on the short range radar
PARAMS:
name - The blip to act upon
ActivationState - true = Show on close range, false = Don't show on close range
)]]
[[sanScript(PROC #SET_STATIC_BLIP_APPEAR_EDGE_RADAR#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState, BOOL NotDuringMission = FALSE# PURPOSE:
Sets if a blip should be shown on the radar edges when its out of range of the radar disc
PARAMS:
name - the blip to act upon
ActivationState - true = appear on edge of radar, false = do not appear on edge of radar
NotDuringMission - true = this blip will not appear on the edge of radar during a mission
)]]
[[sanScript(PROC #SET_STATIC_BLIP_HIDDEN_IN_MISSION#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Sets if this blip is hidden during a mission.
Note: will have no effect if the mission was not started with the mission controller
PARAMS:
name - The blip to act upon
ActivationState - true = hide during mission, false = do not hide during mission
)]]
[[sanScript(PROC #SET_STATIC_BLIP_IS_DISCOVERABLE#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Sets if the blip can be discovered by the player being within range of it
PARAMS:
name - Blip name to act upon
ActivationState - true = discoverable, false = undiscoverable
)]]
[[sanScript(PROC #SET_STATIC_BLIP_IS_DISCOVERED#STATIC_BLIP_NAME_ENUM name,BOOL ActivationState# PURPOSE:
Forces a discoverable blip to be discovered. Or force it undiscovered if not already.
PARAMS:
name - Blip to force discovery on
ActivationState - TRUE = force discovered, FALSE = force undiscovered
)]]
[[sanScript(FUNC BOOL #IS_STATIC_BLIP_OWNERS_ACTIVE#STATIC_BLIP_NAME_ENUM name# PURPOSE:
Is the owner of this static blip the currently activate one
PARAMS:
name -
RETURNS:
)]]
[[sanScript(PROC #SET_STATIC_BLIP_ICON#STATIC_BLIP_NAME_ENUM name,BLIP_SPRITE sprite_icon# PURPOSE:
Sets the blip icon, may be overrided by setting the blip to certain categories
PARAMS:
name - the blip to set
sprite_icon - the icon for it to use
)]]
[[sanScript(PROC #SET_STATIC_BLIP_POSITION#STATIC_BLIP_NAME_ENUM name,VECTOR vpos# PURPOSE:
Position a static blip
PARAMS:
name - the blip to set
vpos - the position to set it to
)]]
[[sanScript(PROC #SET_STATIC_BLIP_CATEGORY#STATIC_BLIP_NAME_ENUM name,STATIC_BLIP_CATEGORIES_ENUM category# PURPOSE:
Sets the category of the blip, TODO: this will set set icon eventually also
automatically sets the blip icon for certain categories
PARAMS:
name -
category -
)]]
[[sanScript(PROC #SET_STATIC_BLIP_CATEGORY_VISIBILITY#STATIC_BLIP_CATEGORIES_ENUM category, BOOL visible# PURPOSE:
Provides a way to switch off (deactivate) an entire category of blips
PARAMS:
category -
visible -
)]]
[[sanScript(PROC #RESET_STATIC_BLIP_CHARACTER_VISIBILITY#STATIC_BLIP_NAME_ENUM name#)]]
[[sanScript(PROC #SET_STATIC_BLIP_CHARACTER_VISIBILITY#STATIC_BLIP_NAME_ENUM name, BOOL visible_only_to_character, enumCharacterList character, BOOL secondary = FALSE# PURPOSE:
Filter visibility of a blip by character, only updated when player character changes
PARAMS:
name -
visible_only_to_character -
character -
)]]
[[sanScript(FUNC BOOL #GET_IS_STATIC_BLIP_CURRENTLY_VISIBLE#STATIC_BLIP_NAME_ENUM name#)]]
[[sanScript(FUNC VECTOR #GET_STATIC_BLIP_POSITION#STATIC_BLIP_NAME_ENUM name#)]]
== building_control_public ==
[[sanScript(PROC #SET_DOOR_STATE#DOOR_NAME_ENUM eName, DOOR_STATE_ENUM eNewState# PURPOSE: Updates the state of the specified door enum
PARAMS:
eDoor - The door enum set up in building_globals.sch
eNewState - The state that we want to change the door to
)]]
[[sanScript(PROC #SET_BUILDING_STATE#BUILDING_NAME_ENUM eName, BUILDING_STATE_ENUM eNewState# PURPOSE: Updates the state of the specified building enum
PARAMS:
eBuilding - The building enum set up in building_globals.sch
eNewState - The state that we want to change the building to
)]]
== cellphone_public ==
[[sanScript(FUNC BOOL #IS_PHONE_ONSCREEN#BOOL ShouldCheckForFullyMovedUp = FALSE#)]]
[[sanScript(PROC #LAUNCH_CELLPHONE_FROM_CONTROLLER_SCRIPT##)]]
[[sanScript(FUNC BOOL #LAUNCH_CELLPHONE_APPLICATION#enumApplicationList AppEnum, BOOL LoadScaleformMovies = TRUE, BOOL OverrideOnscreenCheck = FALSE#)]]
[[sanScript(FUNC BOOL #CHECK_FOR_APPLICATION_EXIT##)]]
[[sanScript(FUNC BOOL #CHECK_FOR_ABNORMAL_EXIT##)]]
[[sanScript(FUNC BOOL #IS_CELLPHONE_ON_HOME_SCREEN##)]]
[[sanScript(FUNC BOOL #IS_CONTACTS_LIST_ON_SCREEN##)]]
[[sanScript(FUNC BOOL #IS_TEXT_MESSAGE_LIST_ON_SCREEN##)]]
[[sanScript(PROC #SET_CELLPHONE_PROFILE_TO_NORMAL##)]]
[[sanScript(FUNC STRING #GET_CURRENTLY_HIGHLIGHTED_APP##)]]
[[sanScript(FUNC STRING #GET_CURRENTLY_HIGHLIGHTED_CONTACT##)]]
[[sanScript(FUNC BOOL #IS_THIS_APP_CURRENTLY_HIGHLIGHTED#STRING WhichAppName#)]]
[[sanScript(FUNC BOOL #IS_THIS_CONTACT_CURRENTLY_HIGHLIGHTED#STRING WhichContactName#)]]
[[sanScript(FUNC BOOL #HAS_CELLPHONE_CAM_JUST_TAKEN_PIC##)]]
[[sanScript(PROC #INHIBIT_CELLPHONE_CAMERA_FUNCTIONS_FOR_DOCKS_SETUP#BOOL b_ShouldInhibit = FALSE#)]]
[[sanScript(FUNC BOOL #IS_CELLPHONE_CAMERA_INHIBITED_FOR_DOCKS_SETUP##)]]
[[sanScript(FUNC BOOL #CHECK_CELLPHONE_LAST_CALL_REJECTED##)]]
[[sanScript(FUNC BOOL #IS_CELLPHONE_DISABLED##)]]
[[sanScript(PROC #HIDE_PHONE_FOR_HOTSWAP#BOOL ShouldHidePhone#)]]
[[sanScript(PROC #HIDE_ACTIVE_PHONE#BOOL ShouldHidePhone, BOOL UseCamPositions = FALSE#)]]
[[sanScript(PROC #HANG_UP_AND_PUT_AWAY_PHONE##)]]
[[sanScript(PROC #DISABLE_CELLPHONE#BOOL IsPhoneDisabled#)]]
[[sanScript(PROC #CHANGE_CALLING_SCREEN_CONTACT_NAMES#enumCharacterList PrimaryChar, enumCharacterList SecondaryChar = NO_CHARACTER#)]]
[[sanScript(PROC #ADD_CONTACT_TO_PHONEBOOK#enumCharacterList CharacterToAdd, enumPhonebookPresence WhichPhonebook, BOOL ShouldDisplayNewContactSignifier = TRUE#)]]
[[sanScript(PROC #ADD_UNKNOWN_CONTACT_TO_PHONEBOOK#enumCharacterList CharacterToAdd, enumPhonebookPresence WhichPhonebook, BOOL ShouldDisplayNewContactSignifier = FALSE#)]]
[[sanScript(PROC #REMOVE_CONTACT_FROM_ALL_PHONEBOOKS#enumCharacterList CharacterToRemove#)]]
[[sanScript(PROC #REMOVE_CONTACT_FROM_INDIVIDUAL_PHONEBOOK#enumCharacterList CharacterToRemove, enumPhoneBookPresence WhichPhoneBook#)]]
[[sanScript(PROC #MAKE_CONTACT_ENTRY_PRIORITY#enumCharacterList CharToForce#)]]
[[sanScript(PROC #MAKE_CONTACT_ENTRY_ALPHA#enumCharacterList CharToForce#)]]
[[sanScript(PROC #REMOVE_ALL_CONTACTS_FROM_ALL_PLAYER_CHARACTERS_PHONEBOOKS##)]]
[[sanScript(FUNC enumPhonebookPresence #GET_CHAR_PHONEBOOK_PRESENCE#enumCharacterList CharToCheck#)]]
[[sanScript(PROC #ADD_ALL_CHARS_TO_ALL_PLAYER_CHARACTERS_PHONEBOOKS##)]]
[[sanScript(FUNC BOOL #IS_CALLING_CONTACT#enumCharacterList CharacterToCheck#)]]
[[sanScript(FUNC BOOL #IS_CONTACT_IN_CONNECTED_CALL#enumCharacterList CharacterToCheck#)]]
[[sanScript(FUNC BOOL #IS_CALLING_ANY_CONTACT##)]]
[[sanScript(FUNC BOOL #IS_TEXTMSG_PRESENT_IN_ANY_FILTER#INT passedIndex#)]]
[[sanScript(FUNC BOOL #SEND_TEXT_MESSAGE_TO_CURRENT_PLAYER#enumCharacterList WhichSender, STRING WhichTextLabel, enumTxtMsgLockedStatus WhichLockStatus, #)]]
[[sanScript(FUNC BOOL #SEND_TEXT_MESSAGE_TO_ALL_PLAYER_CHARACTERS#enumCharacterList WhichSender, STRING WhichTextLabel, enumTxtMsgLockedStatus WhichLockStatus, #)]]
[[sanScript(PROC #DELETE_TEXT_MESSAGE_BY_LABEL_FROM_CURRENT_PLAYER#STRING LabelToDelete#)]]
[[sanScript(PROC #DELETE_TEXT_MESSAGE_BY_LABEL_FROM_ALL_PLAYER_CHARACTERS#STRING LabelToDelete#)]]
[[sanScript(PROC #DELETE_ALL_LOCKED_TEXT_MESSAGES_FROM_CURRENT_PLAYER##)]]
[[sanScript(PROC #UNLOCK_TEXT_MESSAGE_BY_LABEL#STRING LabelToUnlock, BOOL b_EnMasseDeletion = FALSE#)]]
[[sanScript(FUNC BOOL #IS_CRITICAL_MESSAGE_ALREADY_PENDING_FOR_ANY_PLAYER# #)]]
[[sanScript(PROC #HIDE_CELLPHONE_SIGNIFIERS_FOR_CUTSCENE#BOOL b_PassedBool#)]]
[[sanScript(FUNC BOOL #IS_CRITICAL_MESSAGE_ALREADY_PENDING_FOR_CURRENT_PLAYER# #)]]
[[sanScript(FUNC BOOL #OVERRIDE_CRITICAL_MESSAGE_BLOCK_FOR_ALL_PLAYERS##)]]
[[sanScript(FUNC enumTxtMsgIsReplyRequired #GET_TEXT_MESSAGE_REPLY_STATUS#STRING LabelToQuery#)]]
[[sanScript(PROC #SET_ALL_MATCHING_TEXT_MESSAGES_TO_REPLY_REQUIRED#STRING LabelToClear#)]]
[[sanScript(FUNC BOOL #HAS_CONTACT_RECEIVED_PICTURE_MESSAGE#enumCharacterList CharacterToCheck#)]]
[[sanScript(FUNC BOOL #CLEAR_CONTACT_PICTURE_MESSAGE#enumCharacterList CharacterToCheck#)]]
[[sanScript(FUNC BOOL #SET_CONTACT_AS_MISSED_CALLER#enumCharacterList CharacterToCheck#)]]
[[sanScript(FUNC BOOL #CLEAR_MISSED_CALLER_STATUS_FOR_CONTACT#enumCharacterList CharacterToCheck#)]]
[[sanScript(FUNC BOOL #SET_SIDETASK_LIVE#enumCharacterList WhichSideTaskGiver, enumSideTaskList WhichSideTaskIdentifier, BOOL ShouldDisplayNewSideTaskSignifier = TRUE,#)]]
[[sanScript(PROC #SET_SIDETASK_DEAD#enumSideTaskList WhichSideTaskIdentifier#)]]
[[sanScript(FUNC BOOL #SEND_NEW_MULTIPLAYER_JOB#enumCharacterList WhichSender, INT iMission, INT iInstance, STRING WhichTextLabel, enumJobListStatus WhichJobStatus, BOOL ShouldDisplayJobListMsgSignifier = FALSE#)]]
[[sanScript(FUNC BOOL #IS_MULTIPLAYER_MISSION_IN_CELLPHONE_LIST#STRING WhichTextLabel, INT &iWhichSlotIsMissionIn#PURPOSE: Checks if a multiplayer mission is in the cellphone list
)]]
[[sanScript(PROC #CLEAR_CURRENT_MISSION_FROM_CELLPHONE_LIST##PURPOSE: Clear the players current Mission from List
)]]
[[sanScript(FUNC BOOL #GET_CURRENT_JOB_DETAILS_IN_CELLPHONE_LIST#INT &iMission, INT &iInstance, INT &iWhichSlotIsMissionIn#PURPOSE: get the current slot
)]]
[[sanScript(PROC #CLEAR_MISSION_FROM_CELLPHONE_LIST#enumJobListStatus JobType, STRING WhichTextLabel#PURPOSE: Clear Mission from List. Pass in the Job Type (from enumJobListStatus) and the text label for mission you want to clear
)]]
[[sanScript(PROC #FORCE_TIMEOUT_NO_RESPONSE##)]]
[[sanScript(FUNC STRING #GET_LABEL_OF_ACCEPTED_JOB##)]]
[[sanScript(PROC #DELETE_JOB_BY_LABEL##)]]
[[sanScript(PROC #SET_JOB_AS_FINISHED_BY_LABEL##)]]
== comms_control_public ==
[[sanScript(FUNC TEXT_LABEL #GET_TEXT_MESSAGE_BLOCK_ID## PURPOSE: Return the text message block ID (all text messages are in the same blockID)
RETURN: A TEXT_LABEL containing the text message block ID
)]]
[[sanScript(FUNC INT #GET_ID_FOR_COMMUNICATION_FROM_TEXT_BLOCKS#TEXT_LABEL tTextBlock, TEXT_LABEL tTextLabel# PURPOSE: Takes a communication's text block string and main text label string, concatinates them to form a string that *should* be unique
for each communication in the game, and hashes them into a unique INT ID.
PARAMS: strTextBlock - The text block that contains the text required by this communication. Used as the first half of the hashed ID string.
strTextLabel - The main text label for this communication. Used as the second half of the hashed ID string.
RETURNS: A unique INT ID for this communication.
)]]
[[sanScript(FUNC INT #REGISTER_CALL_FROM_CHARACTER_TO_PLAYER#CC_CommunicationType eCommunicationType, # PURPOSE: Registers a phonecall with the communication controller and adds that call to a queue to be triggered as
soon as the controller will allow.
PARAMS: eCommunicationType - The type of comminication being registered. This type will determine the phonecall's priority.
eCharacterTo - A charsheet ENUM defining the playable character this phonecall is to be sent to. CHAR_BLANK_ENTRY will allow the communication to be sent to any playable character.
eCharacterFrom - A charsheet ENUM defining the character this phonecall is being sent from.
iInitialDelay - The time this text will queue before it will be considered for triggering by the communications controller.
strTextBlock - The text block that contains the text required by this phonecall.
strConvLabel - The main text label for this phonecall.
strAltConvLabel - The text label containing alternative call dialogue. Used by quick and missed calls when the
player is phoning the contact. No need to set if bIsQuickCall and bIsMissedCall are both FALSE.
bIsQuickCall - Should this phonecall trigger if the player phones the contact who is to make the call before it has finished queuing?
bIsMissedCall - Should this phonecall be registered as a missed call if the player fails to answer it.
eRestrictedArea - A vector ID that defines an area in the world that the player must not be in for the call to trigger.
eExecuteOnComplete - A code ID that defines a block of script that should be executed when the call is completed sucessfully.
RETURNS: The unique INT ID that references the registered phonecall in the communication controller. This will be -1 if the call failed to register.
)]]
[[sanScript(FUNC INT #REGISTER_CALL_WITH_QUESTION_FROM_CHARACTER_TO_PLAYER# CC_CommunicationType eCommunicationType,# PURPOSE: Registers a phonecall, including a question, with the communication controller and adds that call to a queue to
be triggered as soon as the controller will allow.
PARAMS: eCommunicationType - The type of comminication being registered. This type will determine the phonecall's priority.
eCharacterTo - A charsheet ENUM defining the playable character this phonecall is to be sent to. CHAR_BLANK_ENTRY will allow the communication to be sent to any playable character.
eCharacterFrom - A charsheet ENUM defining the character this phonecall is being sent from.
iInitialDelay - The time this text will queue before it will be considered for triggering by the communications controller.
strTextBlock - The text block that contains the text required by this phonecall.
strConvLabel - The main text label for this phonecall.
strConvAltLabel - The text label containing alternative call dialogue. Used by quick and missed calls when the
player is phoning the contact. No need to set if bIsQuickCall and bIsMissedCall are both FALSE.
strQuestionLabel - A label containing the text for the question associated with this phonecall.
strYesLabel - A label that points to the conversation text that will play if the player chooses the Yes response to this call's question.
strNoLabel - A label that points to the conversation text that will play if the player chooses the No response to this call's question.
bIsQuickCall - Should this phonecall trigger if the player phones the contact who is to make the call before it has finished queuing?
bIsMissedCall - Should this phonecall be registered as a missed call if the player fails to answer it.
eRestrictedArea - A vector ID that defines an area in the world that the player must not be in for the call to trigger.
eExecuteOnComplete - A code ID that defines a block of script that should be executed when the call is completed sucessfully.
RETURNS: The unique INT ID that references the registered phonecall in the communication controller. This will be -1 if the call failed to register.
)]]
[[sanScript(FUNC INT #REGISTER_CHAT_CALL_FROM_PLAYER_TO_CHARACTER# enumCharacterList eCharacterActivatingPlayer,# PURPOSE: Registers a chat phonecall with the communication controller.
PARAMS: eCharacterActivatingPlayer - A charsheet ENUM defining the playable character that must activate this chat call. CHAR_BLANK_ENTRY will allow the call to be activated by any playable character.
eCharacterTo - A charsheet ENUM defining the NPC character this chat call is tied to.
strTextBlock - The text block that contains the text required by this phonecall.
strConvLabel - The main text label for this phonecall.
RETURNS: The unique INT ID that references the registered chat phonecall in the communication controller. This will be -1 if the call failed to register.
)]]
[[sanScript(PROC #REGISTER_END_OF_MISSION_PHONECALL# enumCharacterList eCharacterFrom, # PURPOSE: Registers an end of mission phonecall with the communication controller and adds that call to a queue to be triggered as
soon as the controller will allow.
PARAMS: eCharacterFrom - A charsheet ENUM defining the character this phonecall is being sent from.
strTextBlock - The text block that contains the text required by this phonecall.
strConvLabel - The main text label for this phonecall.
)]]
[[sanScript(FUNC INT #REGISTER_TEXT_MESSAGE_FROM_CHARACTER_TO_PLAYER#CC_CommunicationType eCommunicationType, # PURPOSE: Registers a text message with the communication controller and adds it to a queue to be triggered as soon as
the controller will allow.
PARAMS: eCommunicationType - The type of comminication being registered. This type will determine the text message's priority.
eCharacterTo - A charsheet ENUM defining the playable character this text message is to be sent to. CHAR_BLANK_ENTRY will allow the communication to be sent to any playable character.
eCharacterFrom - A charsheet ENUM defining the character this text message is being sent from.
strTextConvLabel - The main text label for this text message.
eLockedStatus - An ENUM that denotes the locked status of this text message.
iInitialDelay - The time this text will queue before it will be considered for triggering by the communications controller.
eRestrictedArea - A vector ID that defines an area in the world that the player must not be in for the text to trigger.
eExecuteOnComplete - A code ID that defines a block of script that should be executed when the text is sent sucessfully.
iForcedID - Use this argument to force a specific ID for this text message.
RETURNS: The unique INT ID that references the registered text message in the communication controller. This will be -1 if the text failed to register.
)]]
[[sanScript(FUNC BOOL #IS_COMMUNICATION_REGISTERED#INT iCommunicationID# PURPOSE: Checks with the communication controller to see if a communication with a given ID is currently registered.
PARAMS: iCommunicationID - The hashed ID of the communication we want to query.
RETURNS: A boolean that will be true if the queried communication is registered.
)]]
[[sanScript(FUNC CC_CommunicationStatus #GET_COMMUNICATION_STATUS#INT iCommunicationID# PURPOSE: Checks the status of a communication that is registered with the communication controller.
PARAMS: iCommunicationID - The hashed ID of the registered phonecall or text message that we want to query.
RETURNS: An ENUM that represents the current status of the communication.
)]]
[[sanScript(FUNC INT #GET_LAST_COMPLETED_CALL## PURPOSE: Gets the communication ID of the last completed phonecall.
RETURNS: The hashed ID of the last phonecall that was sucessfully sent by the communication controller.
)]]
[[sanScript(FUNC BOOL #DID_LAST_CALL_HAVE_RESPONSE## PURPOSE: Checks if the last completed phonecall had a response set.
RETURNS: A BOOL that will be true if the last phonecall that was sucessfully sent by the communication controller had a response set.
)]]
[[sanScript(FUNC BOOL #GET_LAST_CALL_RESPONSE## PURPOSE: Gets the last phonecall question response that was set in the communication controller.
RETURNS: A BOOL that represents the last YES or NO response that was chosen by the player.
)]]
[[sanScript(FUNC INT #GET_LAST_COMPLETED_TEXT_MESSAGE## PURPOSE: Gets the communication ID of the last completed text message.
RETURNS: The hashed ID of the last text message that was sucessfully sent by the communication controller.
)]]
[[sanScript(FUNC BOOL #DID_LAST_TEXT_HAVE_RESPONSE## PURPOSE: Checks if the last completed text message had a response set.
RETURNS: A BOOL that will be true if the last text message that was sucessfully sent by the communication controller had a response set.
)]]
[[sanScript(FUNC BOOL #GET_LAST_TEXT_RESPONSE## PURPOSE: Gets the last text message question response that was set in the communication controller.
RETURNS: A BOOL that represents the last YES or NO response that was chosen by the player.
)]]
[[sanScript(FUNC BOOL #CANCEL_COMMUNICATION#INT iCommunicationID# PURPOSE: Removes a communication with a given ID from the communication controller's queues.
PARAM NOTES: iCommunicationID - The hashed ID of the communication that is to be cancelled.
RETURN: A BOOL that will be TRUE if the cancel request was sucessful and FALSE if it was not.
)]]
== dead_ped_public ==
[[sanScript(FUNC BOOL #REGISTER_NEARBY_DEAD_PED#PED_INDEX piIn, enumCharacterList charsheet#)]]
[[sanScript(FUNC BOOL #ARE_ANY_DEAD_PEDS_REGISTERED##)]]
[[sanScript(FUNC BOOL #IS_NEARBY_DEAD_PED_CLEAR#enumCharacterList charsheet#)]]
[[sanScript(PROC #FORCE_CLEAR_DEAD_PEDS##)]]
[[sanScript(PROC #DELETE_DEAD_PEDS_OF_TYPE#enumCharacterList charsheet#)]]
== dialogue_public ==
[[sanScript(PROC #Assign_Standard_Dialogue_Holder_Parameters#structPedsForConversation &AssignPedStruct, enumCharacterList AssignWhichChar, STRING AssignWhichBlockOfTextToLoad, enumSubtitlesState AssignDisplaySubtitles = DISPLAY_SUBTITLES, enumBriefScreenState AssignAddToBriefScreen = DO_ADD_TO_BRIEF_SCREEN #)]]
[[sanScript(PROC #Construct_Multipart_Conversation_Roots_and_Specifics#INT Passed_Num_of_Multiparts, STRING &ConstructSegmentLabel[], STRING &ConstructSpecificLabel[],#)]]
[[sanScript(PROC #ADD_PED_FOR_DIALOGUE#structPedsForConversation &YourLocalPedStruct, INT YourNumberID, PED_INDEX YourPedIndex, STRING YourVoiceID, BOOL PedPlayAmbientAnims = FALSE#)]]
[[sanScript(PROC #REMOVE_PED_FOR_DIALOGUE#structPedsForConversation &YourLocalPedStruct, INT YourNumberID#)]]
[[sanScript(FUNC BOOL #CHAR_CALL_PLAYER_CELLPHONE#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority, #)]]
[[sanScript(FUNC BOOL #CHAR_CALL_PLAYER_CELLPHONE_FORCE_ANSWER#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority,#)]]
[[sanScript(FUNC BOOL #PLAYER_CALL_CHAR_CELLPHONE#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority,#)]]
[[sanScript(FUNC BOOL #PLAYER_CALL_EMERGENCY_SERVICES#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority,#)]]
[[sanScript(FUNC BOOL #PLAYER_MAKE_CONFERENCE_CALL#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, enumCharacterList WhichSecondChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority, #)]]
[[sanScript(FUNC BOOL #CHAR_CALL_PLAYER_CELLPHONE_WITH_REPLIES#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority, STRING QuestionGodTextLabel, STRING YesRootLabel, STRING NoRootLabel, #)]]
[[sanScript(FUNC BOOL #CHAR_CALL_PLAYER_CELLPHONE_WITH_REPLIES_FORCE_ANSWER#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority, STRING QuestionGodTextLabel, STRING YesRootLabel, STRING NoRootLabel, #)]]
[[sanScript(FUNC BOOL #PLAYER_CALL_CHAR_CELLPHONE_WITH_REPLIES#structPedsForConversation &YourPedStruct, enumCharacterList WhichChar, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority, STRING QuestionGodTextLabel, STRING YesRootLabel, STRING NoRootLabel, #)]]
[[sanScript(FUNC BOOL #HAS_CELLPHONE_CALL_FINISHED##)]]
[[sanScript(FUNC BOOL #WAS_LAST_CELLPHONE_CALL_INTERRUPTED##)]]
[[sanScript(FUNC BOOL #CHECK_CELLPHONE_LAST_CALL_REJECTED##)]]
[[sanScript(FUNC BOOL #CREATE_CONVERSATION#structPedsForConversation &YourPedStruct, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, enumConversationPriority PassedConversationPriority,#)]]
[[sanScript(FUNC BOOL #PLAY_SINGLE_LINE_FROM_CONVERSATION#structPedsForConversation &YourPedStruct, STRING WhichBlockOfTextToLoad, STRING WhichRootLabel, STRING WhichSpecificLabel, enumConversationPriority PassedConversationPriority,#)]]
[[sanScript(FUNC BOOL #IS_ANY_CONVERSATION_ONGOING_OR_QUEUED##)]]
[[sanScript(PROC #PAUSE_FACE_TO_FACE_CONVERSATION#BOOL ShouldConversationBePaused#)]]
[[sanScript(PROC #KILL_ANY_CONVERSATION##)]]
[[sanScript(PROC #KILL_PHONE_CONVERSATION##)]]
[[sanScript(PROC #KILL_FACE_TO_FACE_CONVERSATION##)]]
[[sanScript(PROC #KILL_FACE_TO_FACE_CONVERSATION_DO_NOT_FINISH_LAST_LINE##)]]
[[sanScript(FUNC enumCellphonePromptResponse #CHECK_RESPONSE_TO_CELLPHONE_PROMPT##)]]
[[sanScript(PROC #CLEAR_RESPONSE_TO_CELLPHONE_PROMPT##)]]
[[sanScript(FUNC BOOL #CREATE_MULTIPART_CONVERSATION_WITH_2_LINES#structPedsForConversation &YourPedStruct, STRING WhichBlockOfTextToLoad, #)]]
[[sanScript(FUNC BOOL #CREATE_MULTIPART_CONVERSATION_WITH_3_LINES#structPedsForConversation &YourPedStruct, STRING WhichBlockOfTextToLoad, #)]]
[[sanScript(FUNC BOOL #CREATE_MULTIPART_CONVERSATION_WITH_4_LINES#structPedsForConversation &YourPedStruct, STRING WhichBlockOfTextToLoad, #)]]
[[sanScript(FUNC BOOL #CREATE_MULTIPART_CONVERSATION_WITH_5_LINES#structPedsForConversation &YourPedStruct, STRING WhichBlockOfTextToLoad, #)]]
== flow_public ==
[[sanScript(PROC #Mission_Flow_Mission_Passed## PURPOSE: Gets called by all missions when they pass to let the Mission Flow know how to proceed.
NOTES: The intention is that the Mission Flow can work out which mission was active without accepting
any extra parameters.
)]]
[[sanScript(PROC #Mission_Flow_Mission_Failed## PURPOSE: Gets called by all missions when they Fail to let the Mission Flow know how to proceed.
NOTES: The intention is that the Mission Flow can work out which mission was active without accepting
any extra parameters.
)]]
[[sanScript(PROC #Mission_Flow_Mission_Force_Cleanup## PURPOSE: Gets called by all missions when they Force Cleanup to let the Mission Flow know how to proceed.
NOTES: The intention is that the Mission Flow can work out which mission was active without accepting
any extra parameters.
)]]
[[sanScript(PROC #Set_Mission_Flow_Flag_State#g_eFlowFlagIDs paramFlagID, BOOL paramState# PURPOSE: Sets the state of a mission flow flag.
INPUT PARAMS: paramFlagID Flag ID having its state changed
paramState TRUE or FALSE
)]]
[[sanScript(FUNC BOOL #Get_Mission_Flow_Flag_State#g_eFlowFlagIDs paramFlagID# PURPOSE: Returns Mission Flow Flag State.
INPUT PARAMS: paramFlagID Flag ID
RETURN VALUE: BOOL Current state (TRUE or FALSE)
)]]
[[sanScript(PROC #Set_Mission_Flow_Int_Value#g_eFlowIntIDs paramIntID, INT paramValue# PURPOSE: Sets the value of a mission flow int.
INPUT PARAMS: paramIntID Int ID having its value changed
paramValue The int value
)]]
[[sanScript(FUNC INT #Get_Mission_Flow_Int_Value#g_eFlowIntIDs paramIntID# PURPOSE: Returns Mission Flow Int Value.
INPUT PARAMS: paramIntID Int ID
RETURN VALUE: INT Current value
)]]
[[sanScript(PROC #Set_Mission_Flow_Bitset_Bit_State#g_eFlowBitsetIDs paramBitsetID, INT paramBit, BOOL paramState# PURPOSE: Sets the state of a mission flow bitset bit.
INPUT PARAMS: paramBitsetID Bitset ID having a state changed
paramBit Bitflag as an Int of the bit being modified
paramState TRUE or FALSE
)]]
[[sanScript(FUNC BOOL #Get_Mission_Flow_Bitset_Bit_State#g_eFlowBitsetIDs paramBitsetID, INT paramBit# PURPOSE: Returns Mission Flow Bitset Bit State.
INPUT PARAMS: paramBitsetID Bitset ID
paramBit Bitflag as an Int of the bit being modified
RETURN VALUE: BOOL Current state (TRUE (1) or FALSE (0))
)]]
== mission_control_public ==
[[sanScript(FUNC m_enumMissionCandidateReturnValue #Request_Mission_Launch#INT &id, m_enumMissionCandidateTypeID type# PURPOSE:
Request use of mission flag
PARAMS:
id - identifier for your transaction, be sure to set this value to NO_CANDIDATE_ID
before you call it for the first time
type - The category of the mission you wish to launch, used for priority resolution
MCRET_ACCEPTED - go ahead and launch
MCRET_DENIED - A mission with a different ID has been given authority to launch
MCRET_PROCESSING - The decision is still pending, please wait
RETURNS:
)]]
[[sanScript(FUNC BOOL #Is_Any_Mission_Launched## PURPOSE:
Checks the mission flag and returns it's state
The state of the mission flag
RETURNS:
)]]
[[sanScript(PROC #Register_Contact_Point_Mission_Trigger#INT &trigger_id_out,STATIC_BLIP_NAME_ENUM blip_involved, m_enumMissionCandidateTypeID mission_type_involved, INT hour_window_start = -1,INT hour_window_end = -1,BOOL switch_to_char = FALSE,INT char_flags = -1# PURPOSE:
Add a mission trigger point on a blip
PARAMS:
trigger_id_out - this will store the index of your created trigger, used to perform operations on
triggers
blip_involved - the blip index used as the trigger point
mission_type_involved - The mission type that is going to launch on triggering this.
Used for conflict resolution.
)]]
[[sanScript(PROC #Register_Contact_Point_Mission_Trigger_No_Time#INT &trigger_id_out,STATIC_BLIP_NAME_ENUM blip_involved, m_enumMissionCandidateTypeID mission_type_involved,BOOL switch_to_char,INT char_flags#)]]
[[sanScript(FUNC BOOL #Has_Mission_Trigger_Triggered#INT trigger_id_in# PURPOSE:
Checks if the conditions to activate the trigger with the registered index have been met
FALSE - mission not triggered
TRUE - The trigger has been fired and the mission is clear to launch, remember to
inform the system that you are done with it using Triggered_Mission_Has_Terminated
RETURNS:
)]]
[[sanScript(PROC #Triggered_Mission_Has_Terminated#INT trigger_id_in# PURPOSE:
Informs the mission triggering system that the mission that previously launched after
recieving approval from Has_Mission_Trigger_Triggered has now terminated.
PARAMS:
trigger_id_in - the trigger index that was previously launched with Has_Mission_Trigger_Triggered
)]]
[[sanScript(PROC #Remove_Mission_Trigger#INT trigger_id_in#)]]
== parachute_public ==
[[sanScript(FUNC INT #GET_PARACHUTE_PED_INDEX#PED_INDEX ped# PURPOSE:
Retrieves the global parachute data that is associated with the given ped. This is called locally by all the other
public functions to make sure it is safe to perform actions on parachute data. It shouldn't be necessary to use this
in other scripts. If no parachute data matches the ped, it returns -1.
PARAMS:
ped - the parachute ped
An integer giving the index of the parachute ped data for this ped.
RETURNS:
)]]
[[sanScript(PROC #SET_PARACHUTE_PED_DEFAULT_FLOATING_VELOCITY#PED_INDEX ped, FLOAT vel# PURPOSE:
Sets the default floating vertical velocity (i.e. when not spiral diving/braking/accelerating) to a new value.
The value must lie between -2 and -15 (higher/lower values are capped).
This will also adjust the minimum and maximum velocities to ensure they remain slower/faster.
Setting the velocity to 0 will reset all values to their defaults.
PARAMS:
ped - the parachute ped
vel - The new floating velocity
)]]
[[sanScript(PROC #SET_PARACHUTE_PED_DEFAULT_FREE_FALL_VELOCITY#PED_INDEX ped, FLOAT vel# PURPOSE:
Sets the default free-fall velocity (i.e. when not diving) to a new value.
The value must lie between -2 and -100 (higher/lower values are capped).
This will also adjust the max velocity (the velocity used while diving) accordingly, as the max always needs to be faster.
Setting the velocity to 0 will reset all values to their defaults.
PARAMS:
ped - the parachute ped
vel - The new free_fall velocity
)]]
[[sanScript(PROC #SET_PARACHUTE_PED_DESTINATION#PED_INDEX ped, VECTOR dest# PURPOSE:
Sets the destination for an AI parachute ped. This destination is only used if the ped is not the player and they are
set to the movement style PARA_MOVEMENT_GO_TO_COORD
PARAMS:
ped - the parachute ped
dest - The new destination coordinates
)]]
[[sanScript(PROC #SET_PARACHUTE_PED_HEADING#PED_INDEX ped, FLOAT heading# PURPOSE:
Sets the parachute ped's heading to a new value. Normally, the ped's rotation is handled each frame by the parachute code. This
proc overrides the current desired z-rotation being used by the parachute code.
PARAMS:
ped - the parachute ped
heading - the new heading
)]]
[[sanScript(PROC #SET_PARACHUTE_PED_AI_STYLE#PED_INDEX ped, PARACHUTE_PED_AI_STYLE ai_style# PURPOSE:
Sets the behaviour of an AI parachute ped. Currently there are 3 possible behaviours:
Manual - Relies on manual input through the control pad
Goto Coordinate - Causes the ped to try to reach a particular coordinate
Follow player - Causes the ped to try to reach the player
PARAMS:
ped - the parachute ped
ai_style -
)]]
[[sanScript(FUNC BOOL #IS_PARACHUTE_PED_IDLE#PED_INDEX ped# PURPOSE:
Checks if the parachute ped is currently on the ground doing nothing important (e.g. playing landing anims). This is basically
the same as IS_PARACHUTE_PED_ON_GROUND but will not return true if the ped is currently in the landed
phase. This will also return true if the ped doesn't have a parachute
PARAMS:
ped - the parachute ped
Boolean indicating if the parachute ped is idle.
RETURNS:
)]]
[[sanScript(FUNC BOOL #IS_PARACHUTE_PED_ON_GROUND#PED_INDEX ped# PURPOSE:
Checks if the parachute ped is currently on the ground. Returns true if the ped is currently in the PARA_STATE_ON_GROUND or
PARA_STATE_LANDED states. It will also return true if the ped doesn't have a parachute but they're still on the ground.
PARAMS:
ped - the parachute ped
Boolean indicating whether the ped is on the ground
RETURNS:
)]]
[[sanScript(PROC #FORCE_ENTER_FREE_FALL#PED_INDEX ped# PURPOSE:
Forces an existing parachute ped immediately into the free-fall state. This is useful if you wish
to create peds that start off immediately in free-fall.
PARAMS:
ped - the parachute ped
)]]
[[sanScript(PROC #FORCE_OPEN_PARACHUTE#PED_INDEX ped# PURPOSE:
Forces an existing parachute ped immediately into the open state. This is useful if you wish
to create peds that start immediately with their parachutes open. This differs from OPEN_PARACHUTE,
which just triggers the proper transition between free-fall and floating.
PARAMS:
ped - the parachute ped
)]]
[[sanScript(PROC #OPEN_PARACHUTE#PED_INDEX ped# PURPOSE:
Triggers the opening of the parachute if a ped is in free-fall mode. This is useful if you
want a free-falling ped to open their parachute at a specific moment
PARAMS:
ped - the parachute ped
)]]
[[sanScript(PROC #REQUEST_PARACHUTE_RESOURCES##)]]
[[sanScript(PROC #SET_PARACHUTE_RESOURCES_AS_NO_LONGER_NEEDED##)]]
[[sanScript(FUNC BOOL #HAVE_PARACHUTE_RESOURCES_LOADED## PURPOSE:
Checks if all the parachute resources have been loaded
RETURNS:
)]]
[[sanScript(FUNC BOOL #DOES_PED_HAVE_PARACHUTE#PED_INDEX ped# PURPOSE:
Checks if the given ped has a parachute equipped, and that it is safe to use (i.e. all resources are loaded and a parachute script has
been launched for the ped).
PARAMS:
ped - the parachute ped
boolean indicating if the ped has a working parachute.
RETURNS:
)]]
[[sanScript(PROC #GIVE_PED_A_PARACHUTE#PED_INDEX ped# PURPOSE:
Initialises a set of parachute ped data, and associates it with a given ped. Once this is called, a ped is considered
to be using the parachute until they land, are killed, or the parachute data is explicitly reset.
NOTE: If all the AI slots are filled (currently a max of 4), this function will do nothing.
PARAMS:
ped - The ped index
)]]
[[sanScript(PROC #FLUSH_PARACHUTE_PED_DATA## PURPOSE:
Empties all of the parachute ped slots so they can be re-used. Any parachute ped scripts currently running should terminate after this is called.
)]]
[[sanScript(PROC #FORCE_RESET_PARACHUTE_PED#PED_INDEX ped# PURPOSE:
Forces a parachute ped to be reset. This will remove the parachute, reset all the variables associated with the ped, and
terminate the parachute script for this ped.
PARAMS:
ped - the parachute ped
)]]
[[sanScript(PROC #SET_ALWAYS_ACTIVATE_FREE_FALL#BOOL b_always_activate# PURPOSE:
When set to true, free-fall will activate any time a ped is above ground. If false, it will only activate
if the ped is high enough from the ground to activate the parachute and land.
PARAMS:
b_always_activate -
)]]
[[sanScript(PROC #ENABLE_ALL_PARACHUTE_LANDINGS#BOOL b_enable_landings# PURPOSE:
When set to true, all parachute landing anims are used. If false, only the basic anim is used. This is useful
in special cases such as landing on vehicles or landing in tandem.
PARAMS:
b_enable_landings -
)]]
[[sanScript(PROC #USE_FAST_BLEND_INTO_FREE_FALL#BOOL b_use_fast_blend# PURPOSE:
If set to true, the blend from idle into free-fall will be a single frame. If false, the blend is smooth. Setting this to
true is useful if you need a ped to start immediately in free-fall, or to link from one anim into the free-fall anim.
PARAMS:
b_use_fast_blend -
)]]
[[sanScript(PROC #ENABLE_PARACHUTE_HELP#BOOL b_use_help# PURPOSE:
When set to true, help text for the parachute will appear if equipped to the player.
PARAMS:
b_use_help -
)]]
[[sanScript(PROC #DISABLE_PARACHUTE_PED_UPDATES#PED_INDEX ped, BOOL b_disable_toggle# PURPOSE:
When set to true, updates to the parachute peds physics and anims are not performed. This is useful if you need to override
the parachute for a period of time: e.g. to play a scripted cutscene in mid-air, and then return to the parachute afterwards.
PARAMS:
ped -
b_disable_toggle -
)]]
[[sanScript(PROC #ALLOW_PARACHUTING_ON_MOVING_VEHICLES#BOOL b_allow_vehicle_landing# PURPOSE:
When set to true, the player will not automatically ragdoll when landing on a moving vehicle. This is useful for missions
that require landing on vehicles.
PARAMS:
b_allow_vehicle_landing -
)]]
[[sanScript(FUNC PARACHUTE_STATES #GET_PARACHUTE_PED_STATE#PED_INDEX ped# PURPOSE:
Returns the current state of a parachute ped. The list of states can be found in parachute_globals.sch. If the ped
doesn't have a parachute, it will assert and return PARA_STATE_ON_GROUND as a default.
PARAMS:
ped -
RETURNS:
)]]
[[sanScript(PROC #ALLOW_INFINITE_PARACHUTE#BOOL b_allow_infinite_parachute# PURPOSE:
Sets the parachute for the player to not remove itself on landing, letting the player use it as many times as they want.
PARAMS:
b_allow_infinite_parachute -
)]]
[[sanScript(FUNC INT #GET_BACKPACK_TYPE##)]]
[[sanScript(PROC #REQUEST_PARACHUTE_BACKPACK## PURPOSE:
Specifically loads just the parachute backpack (even if you don't have the parachute), and makes it invisible. Once the player is given the parachute, the backpack
should be made visible.
)]]
[[sanScript(FUNC BOOL #IS_PARACHUTE_BACKPACK_LOADED##)]]
[[sanScript(FUNC BOOL #DOES_BACKPACK_MATCH_CLOTHES##)]]
[[sanScript(PROC #SET_PARACHUTE_BACKPACK_VISIBLE#BOOL b_is_on# PURPOSE:
Forces the visibility of the parachute backpack (will also load the backpack in if it hasn't been done)
PARAMS:
b_is_on - Boolean: True is visible
)]]
[[sanScript(PROC #GIVE_PLAYER_PARACHUTE_DONT_EQUIP## PURPOSE:
Flags the player as owning a parachute. It can then be equipped/unequipped at any time
)]]
[[sanScript(PROC #REMOVE_PLAYER_PARACHUTE## PURPOSE:
Removes the player's ownership of a parachute. This will normally happen if they die.
)]]
[[sanScript(FUNC FLOAT #GET_PARACHUTE_DANGER_LEVEL#FLOAT height, FLOAT vel, INT i_ped = 0# PURPOSE:
Calculates the danger level for a parachute ped: a value between 0 and 1 that is used to indicate
if they are going too fast and too close to the ground. A value of 1 indicates that the ped is safe.
If they are travelling fast enough to die on impact, the value will decrease as they get closer to the ground.
PARAMS:
height - The current height of the ped above ground level
vel - The current falling velocity of the ped.
The current danger level value
RETURNS:
)]]
[[sanScript(PROC #ALLOW_PARACHUTE_DIVE_FROM_CHOPPERS#BOOL b_allow#)]]
[[sanScript(PROC #DISABLE_OPEN_PARACHUTE#BOOL b_disable# PURPOSE:
Stops the player from being able to open their parachute (they will still enter free-fall)
)]]
[[sanScript(PROC #DISABLE_PARACHUTE_BACKPACK_CHECKS#BOOL b_disable#)]]
== player_ped_public ==
[[sanScript(FUNC BOOL #IS_PLAYER_PED_PLAYABLE#enumCharacterList ePed# PURPOSE: Returns TRUE if the specified ped enum is one of the playable characters.
)]]
[[sanScript(FUNC MODEL_NAMES #GET_PLAYER_PED_MODEL#enumCharacterList ePed# PURPOSE: Returns the model enum for the specified player character
)]]
[[sanScript(FUNC MODEL_NAMES #GET_PLAYER_VEH_MODEL#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Returns the vehicle model enum for the specified player character
)]]
[[sanScript(PROC #REQUEST_PLAYER_PED_MODEL#enumCharacterList ePed# PURPOSE: Makes a request for the appropriate player ped model
)]]
[[sanScript(FUNC BOOL #HAS_PLAYER_PED_MODEL_LOADED#enumCharacterList ePed# PURPOSE: Checks to see if the model for the specified ped has been loaded
)]]
[[sanScript(PROC #SET_PLAYER_PED_MODEL_AS_NO_LONGER_NEEDED#enumCharacterList ePed# PURPOSE: Marks the specified player peds model as no longer needed
)]]
[[sanScript(PROC #REQUEST_PLAYER_VEH_MODEL#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Makes a request for the appropriate player vehicle model
)]]
[[sanScript(FUNC BOOL #HAS_PLAYER_VEH_MODEL_LOADED#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Checks to see if the model for the specified ped vehicle has been loaded
)]]
[[sanScript(PROC #SET_PLAYER_VEH_MODEL_AS_NO_LONGER_NEEDED#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Marks the specified player vehicle model as no longer needed
)]]
[[sanScript(FUNC MODEL_NAMES #GET_NPC_PED_MODEL#enumCharacterList ePed# PURPOSE: Returns the model enum for the specified story character
)]]
[[sanScript(FUNC MODEL_NAMES #GET_NPC_VEH_MODEL#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Returns the vehicle model enum for the specified story character
)]]
[[sanScript(PROC #REQUEST_NPC_PED_MODEL#enumCharacterList ePed# PURPOSE: Makes a request for the appropriate story ped model
)]]
[[sanScript(FUNC BOOL #HAS_NPC_PED_MODEL_LOADED#enumCharacterList ePed# PURPOSE: Checks to see if the model for the specified ped has been loaded
)]]
[[sanScript(PROC #SET_NPC_PED_MODEL_AS_NO_LONGER_NEEDED#enumCharacterList ePed# PURPOSE: Marks the specified story peds model as no longer needed
)]]
[[sanScript(PROC #REQUEST_NPC_VEH_MODEL#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Makes a request for the appropriate story peds vehicle model
)]]
[[sanScript(FUNC BOOL #HAS_NPC_VEH_MODEL_LOADED#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Checks to see if the model for the specified story peds vehicle has been loaded
)]]
[[sanScript(PROC #SET_NPC_VEH_MODEL_AS_NO_LONGER_NEEDED#enumCharacterList ePed, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Marks the specified story peds vehicle model as no longer needed
)]]
[[sanScript(FUNC BOOL #HAS_DEFAULT_INFO_BEEN_SET## PURPOSE: Returns TRUE if the default ped info has been set for each player character
)]]
[[sanScript(PROC #SET_PLAYER_PED_AVAILABLE#enumCharacterList ePed, BOOL bAvailable# PURPOSE: Sets the global flag that states if a player character is currently available
)]]
[[sanScript(FUNC BOOL #IS_PLAYER_PED_AVAILABLE#enumCharacterList ePed# PURPOSE: Returns TRUE if the specified player is available at this point in the game
)]]
[[sanScript(FUNC enumCharacterList #GET_PLAYER_PED_ENUM#PED_INDEX ped# PURPOSE: Returns the player ped enum based on the specified peds model
)]]
[[sanScript(PROC #UPDATE_CURRENT_PLAYER_PED_ENUM## PURPOSE: Sets the current ped global enum based on the player model
NOTE: If this proc gets called too many times per frame then perhaps we should consider another method...
)]]
[[sanScript(FUNC BOOL #IS_PED_THE_CURRENT_PLAYER_PED#enumCharacterList ePed# PURPOSE: Returns TRUE if the specified ped enum matches the current player ped enum
)]]
[[sanScript(FUNC enumCharacterList #GET_CURRENT_PLAYER_PED_ENUM## PURPOSE: Gets the ENUM value of the current ped in control
)]]
[[sanScript(FUNC enumCharacterList #GET_LAST_KNOWN_PLAYER_PED_ENUM## PURPOSE: Gets the ENUM value of the last know player ped in control
)]]
[[sanScript(FUNC enumCharacterList #GET_PREVIOUS_PLAYER_PED_ENUM## PURPOSE: Gets the ENUM value of the previous player ped in control
)]]
[[sanScript(FUNC INT #GET_CURRENT_PLAYER_PED_INT## PURPOSE: Gets the INT value of the current ped in control
)]]
[[sanScript( FUNC STRING #GET_PLAYER_PED_STRING#enumCharacterList ePed# PURPOSE: Gets the STRING value of the specified ped - debug use.
)]]
[[sanScript( FUNC STRING #GET_CURRENT_PLAYER_PED_STRING## PURPOSE: Gets the STRING value of the current ped in control
)]]
[[sanScript(FUNC BOOL #IS_PLAYER_PED_SWITCH_IN_PROGRESS## PURPOSE: Returns TRUE if a request to switch the player character is currently in progress
)]]
[[sanScript(FUNC BOOL #MAKE_PLAYER_PED_SWITCH_REQUEST#enumCharacterList ePed, PED_REQUEST_TYPE_ENUM eType, STATIC_BLIP_NAME_ENUM eBlipID = STATIC_BLIP_NAME_DUMMY_FINAL# PURPOSE: Make a request to change the current player character
)]]
[[sanScript(FUNC BOOL #MAKE_PLAYER_PED_SWITCH_REQUEST_FROM_MP_KICK#enumCharacterList ePed, PED_REQUEST_TYPE_ENUM eType, STATIC_BLIP_NAME_ENUM eBlipID = STATIC_BLIP_NAME_DUMMY_FINAL# PURPOSE: Make a request to change the current player character when MP fails
NOTE: This shoul donly be called when in MP or when kicked out of MP.
)]]
[[sanScript(PROC #SET_PED_SWITCH_FLAG_STATE#PED_SWITCH_FLAGS_ENUM eFlag, BOOL bState# PURPOSE: Sets the ped switch flag state - used for character timetable
)]]
[[sanScript(PROC #SET_PLAYER_PED_STORED_HEALTH#enumCharacterList ePed, INT iHealth# PURPOSE: Updates the stored value for the player peds health
NOTE: The player is considered dead if the health is <= 100
)]]
[[sanScript(PROC #STORE_PLAYER_PED_COMPONENT_VARIATIONS#PED_INDEX ped# PURPOSE: Cycles through the ped components and store each enum
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_COMPONENT_VARIATIONS#PED_INDEX &ped# PURPOSE: Sets the component items for each component type
)]]
[[sanScript(PROC #STORE_PLAYER_PED_AMMO#PED_INDEX ped# PURPOSE: Cycles through the list of weapons and checks to see if the player has any ammo
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_AMMO#PED_INDEX &ped# PURPOSE: Removes all the peds weapons and then sets the new ammo for each
)]]
[[sanScript(PROC #STORE_PLAYER_PED_HEALTH#PED_INDEX ped# PURPOSE: Stores the player peds health.
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_HEALTH#PED_INDEX &ped# PURPOSE: Sets the player peds health.
)]]
[[sanScript(PROC #STORE_PLAYER_PED_ARMOUR#PED_INDEX ped# PURPOSE: Stores the player peds armour.
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_ARMOUR#PED_INDEX &ped# PURPOSE: Sets the player peds armour.
)]]
[[sanScript(PROC #STORE_PLAYER_PED_POSITION#PED_INDEX ped# PURPOSE: Stores the player peds coordinates and heading.
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_POSITION#PED_INDEX &ped# PURPOSE: Sets the player peds coordinates and heading.
)]]
[[sanScript(PROC #STORE_PLAYER_PED_PROPS#PED_INDEX ped# PURPOSE: Stores the player peds props
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_PROPS#PED_INDEX &ped# PURPOSE: Sets the player peds props
)]]
[[sanScript(PROC #STORE_PLAYER_PED_LAST_GAME_TIME#PED_INDEX ped# PURPOSE: Stores the current game time to mark last usage of player ped.
)]]
[[sanScript(PROC #STORE_PLAYER_PED_INFO#PED_INDEX ped# PURPOSE: Calls all the seperate store procs
)]]
[[sanScript(PROC #RESTORE_PLAYER_PED_INFO#PED_INDEX &ped# PURPOSE: Calls all the seperate restore procs
)]]
[[sanScript(FUNC BOOL #SET_CURRENT_PLAYER_PED#enumCharacterList ePed, BOOL bCleanupModel = TRUE# PURPOSE: Sets the current player character. ENUM must be either CHAR_MICHAEL, CHAR_TREVOR, or CHAR_FRANKLIN
NOTE: This func must be called each frame until TRUE has been returned
)]]
[[sanScript(FUNC BOOL #CREATE_PLAYER_PED_ON_FOOT_AT_LAST_KNOWN_LOCATION#PED_INDEX &ReturnPed, enumCharacterList ePed, BOOL bCleanupModel = TRUE# PURPOSE: Creates the specified player character on foot at their last saved location.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should either be CHAR_MICHAEL, CHAR_FRANKLIN, or CHAR_TREVOR
)]]
[[sanScript(FUNC BOOL #CREATE_PLAYER_PED_ON_FOOT#PED_INDEX &ReturnPed, enumCharacterList ePed, VECTOR vCoords, FLOAT fHeading = 0.0, BOOL bCleanupModel = TRUE# PURPOSE: Creates the specified player character on foot.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should be one of the main characters.
)]]
[[sanScript(FUNC BOOL #CREATE_PLAYER_PED_INSIDE_VEHICLE#PED_INDEX &ReturnPed, enumCharacterList ePed, VEHICLE_INDEX vehicle, VEHICLE_SEAT seat = VS_DRIVER, BOOL bCleanupModel = TRUE# PURPOSE: Creates the specified player character in a vehicle that has already been created.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should be one of the main characters.
)]]
[[sanScript(FUNC BOOL #CREATE_PLAYER_VEHICLE#VEHICLE_INDEX &ReturnVeh, enumCharacterList ePed, VECTOR vCoords, FLOAT fHeading, BOOL bCleanupModel = TRUE, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Creates the specified player characters vehicle.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should be one of the main characters.
The eTypePreference will use the player vehicle that closely matches the type specified
)]]
[[sanScript(FUNC BOOL #IS_PLAYER_USING_DEFAULT_VEHICLE#VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Returns TRUE if the player is considered to be in their default vehicle.
)]]
[[sanScript(FUNC BOOL #CREATE_NPC_PED_ON_FOOT#PED_INDEX &ReturnPed, enumCharacterList ePed, VECTOR vCoords, FLOAT fHeading = 0.0, BOOL bCleanupModel = TRUE# PURPOSE: Creates the specified non-player character on foot.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should be one of the main characters.
)]]
[[sanScript(FUNC BOOL #CREATE_NPC_PED_INSIDE_VEHICLE#PED_INDEX &ReturnPed, enumCharacterList ePed, VEHICLE_INDEX vehicle, VEHICLE_SEAT seat = VS_DRIVER, BOOL bCleanupModel = TRUE# PURPOSE: Creates the specified non-player character in a vehicle that has already been created.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should be one of the main characters.
)]]
[[sanScript(FUNC BOOL #CREATE_NPC_VEHICLE#VEHICLE_INDEX &ReturnVeh, enumCharacterList ePed, VECTOR vCoords, FLOAT fHeading, BOOL bCleanupModel = TRUE, VEHICLE_CREATE_TYPE_ENUM eTypePreference = VEHICLE_TYPE_DEFAULT# PURPOSE: Creates the specified non-player characters vehicle.
NOTE: This function should be called each frame until TRUE is returned.
The ePed param should be one of the story characters (CHAR_LESTER, CHAR_TRACEY, CHAR_LAMAR etc).
The eTypePreference will use the player vehicle that closely matches the type specified
)]]
== script_drawing ==
[[sanScript(FUNC INT #INT_COLOUR#INT red, INT green, INT blue, INT alpha#PURPOSE: sets an int to store the values of an RGBA
)]]
[[sanScript(FUNC INT #INT_ALPHA#INT colour#PURPOSE: gets the alpha value from the int
)]]
[[sanScript(FUNC INT #INT_BLUE#INT colour#PURPOSE: gets the blue value from the int
)]]
[[sanScript(FUNC INT #INT_GREEN#INT colour#PURPOSE: gets the green value from the int
)]]
[[sanScript(FUNC INT #INT_RED#INT colour#PURPOSE: gets the red value from the int
)]]
[[sanScript(FUNC FLOAT #GET_TEXT_WIDTH#STRING text, FLOAT scaleX, FLOAT scaleY, BOOL literal = FALSE#PURPOSE: gets the width that the text will take up when drawn
)]]
[[sanScript(PROC #DISPLAY_TEXT_LABEL#STRING text, FLOAT posX, FLOAT posY, FLOAT scaleX, FLOAT scaleY, FLOAT wrapL, FLOAT wrapR, INT colour, INT backshadow = 0, INT backshadowColour = 0#PURPOSE: draws the text label to the screen
)]]
[[sanScript(PROC #DISPLAY_TEXT_LABEL_WITH_NUMBER#STRING text, FLOAT posX, FLOAT posY, FLOAT scaleX, FLOAT scaleY, FLOAT wrapL, FLOAT wrapR, INT colour, INT iNumber, INT backshadow = 0, INT backshadowColour = 0#PURPOSE: draws the text label to the screen
)]]
[[sanScript(PROC #DISPLAY_TEXT_LABEL_WITH_2_NUMBERS#STRING text, FLOAT posX, FLOAT posY, FLOAT scaleX, FLOAT scaleY, FLOAT wrapL, FLOAT wrapR, INT colour, INT iNumber1, INT iNumber2, INT backshadow = 0, INT backshadowColour = 0#PURPOSE: draws the text label to the screen
)]]
[[sanScript(PROC #DISPLAY_LITERAL_TEXT#STRING text, FLOAT posX, FLOAT posY, FLOAT scaleX, FLOAT scaleY, FLOAT wrapL, FLOAT wrapR, INT colour, INT backshadow = 0, INT backshadowColour = 0#PURPOSE: draws some literal text to the screen
)]]
== script_heist ==
[[sanScript(FUNC PlanningLocationName #GET_HEIST_PLANNING_LOCATION_ENUM#INT heistIndex#PURPOSE: Returns the planning location associated with a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC VECTOR #GET_HEIST_PLANNING_LOCATION#INT heistIndex#PURPOSE: Returns the position of the planning location associated with a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC VECTOR #GET_HEIST_PLANNING_BOARD_LOCATION#INT heistIndex#PURPOSE: Returns the position of the board in a planning location associated with a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC FLOAT #GET_HEIST_PLANNING_LOCATION_BOARD_HEADING#INT heistIndex#PURPOSE: Returns the heading of the board in a planning location associated with a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC TEXT_LABEL_31 #GET_HEIST_PLANNING_LOCATION_ROOM_NAME#INT heistIndex#PURPOSE: Returns the room name of the planning location interior associated with a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC BOOL #HAS_HEIST_CREW_BEEN_SELECTED#INT heistIndex#PURPOSE: Returns whether or not the player has selected a crew for this heist yet.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC INT #GET_HEIST_CREW_SIZE#INT heistIndex#PURPOSE: Returns the number of crew members that are available on a specified heist.
INFO: Author - Ben Rollinson
PARAMS NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC CrewMember #GET_HEIST_CREW_MEMBER_AT_INDEX#INT heistIndex,INT slotIndex#PURPOSE: Returns the crew member currently saved in a specified heist crew slot index.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
slotIndex - An index that references the slot that the crew member is saved in.
)]]
[[sanScript(FUNC PED_INDEX #CREATE_HEIST_CREW_MEMBER#CrewMember crewMem, VECTOR position, FLOAT heading, MODEL_NAMES forcedModel = DUMMY_MODEL_FOR_SCRIPT#PURPOSE: Creates and configures a ped based on a specified CrewMember enum.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that references the crew member that is to be created.
position - The VECTOR position at which the crew member will be created.
heading - A FLOAT value that determines the heading the crew member will be facing when created.
forcedModel - A MODEL_NAMES ENUM than can be set to override this crew member's normal character model.
)]]
[[sanScript(FUNC PED_INDEX #CREATE_HEIST_CREW_MEMBER_AT_INDEX#INT heistIndex, INT slotIndex, VECTOR position, FLOAT heading, MODEL_NAMES forcedModel = DUMMY_MODEL_FOR_SCRIPT#PURPOSE: Creates and configures a ped based on the information found in a specified heist crew slot.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
slotIndex - An index that references the slot that the crew member is saved in.
position - The VECTOR position at which the crew member will be created.
heading - A FLOAT value that determines the heading the crew member will be facing when created.
forcedModel - A MODEL_NAMES ENUM than can be set to override this crew member's normal character model.
)]]
[[sanScript(PROC #REQUEST_MODELS_FOR_HEIST_CREW#INT heistIndex#PURPOSE: Requests the models are loaded for all crew members saved in the crew slots of a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(FUNC BOOL #HAVE_MODELS_LOADED_FOR_HEIST_CREW#INT heistIndex#PURPOSE: Checks whether or not all crew models are loaded for the crew members saved in the crew slots of a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(PROC #SET_MODELS_FOR_HEIST_CREW_AS_NO_LONGER_NEEDED#INT heistIndex#PURPOSE: Sets models as no longer needed for all the crew members saved in the crew slots of a specified heist.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(PROC #REQUEST_MODEL_FOR_CREW_MEMBER#CrewMember crewMem#PURPOSE: Requests that a crew member's model is loaded.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that references the crew member whose model is to be streamed in.
)]]
[[sanScript(FUNC BOOL #HAS_MODEL_LOADED_FOR_CREW_MEMBER#CrewMember crewMem#PURPOSE: Checks whether or not a crew member's model is loaded.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that references the crew member who will have their model load state checked.
)]]
[[sanScript(PROC #SET_MODEL_FOR_CREW_MEMBER_AS_NO_LONGER_NEEDED#CrewMember crewMem#PURPOSE: Sets a crew member's model as no longer needed.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that references the crew member whose model will be flagged as no longer needed.
)]]
[[sanScript(FUNC STRING #GET_CREW_MEMBER_NAME#CrewMember crewMem#PURPOSE: Returns the name of a specified crew member.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that points to the crew member whose name is to be retrieved.
)]]
[[sanScript(FUNC CrewMemberType #GET_CREW_MEMBER_TYPE#CrewMember crewMem#PURPOSE: Returns the type of a specified crew member.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that points to the crew member whose type is to be retrieved.
)]]
[[sanScript(FUNC MODEL_NAMES #GET_CREW_MEMBER_MODEL#CrewMember crewMem#PURPOSE: Returns the character model of a specified crew member.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that points to the crew member whose character model is to be retrieved.
)]]
[[sanScript(FUNC WEAPON_TYPE #GET_CREW_MEMBER_WEAPON#CrewMember crewMem#PURPOSE: Returns the default weapon of a specified crew member.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that points to the crew member whose default weapon is to be retrieved.
)]]
[[sanScript(FUNC INT #GET_CREW_MEMBER_ACCURACY#CrewMember crewMem#PURPOSE: Returns the shooting accuracy (the percentage of shots that hit) of a specified crew member.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that points to the crew member whose shooting accuracy is to be retrieved.
)]]
[[sanScript(FUNC INT #GET_CREW_MEMBER_JOB_CUT#CrewMember crewMem#PURPOSE: Returns the percentage of a heist's takings that the specified crew member will take as payment.
INFO: Author - Ben Rollinson
PARAM NOTES:
crewMem - A CrewMember enum that points to the crew member whose cut percentage is to be retrieved.
)]]
[[sanScript(PROC #DEBUG_SET_HEIST_CREW_MEMBER_AT_INDEX#INT heistIndex, INT index, CrewMember crewMem#PURPOSE: Debug function to set which crew member is saved in a specific heist crew index.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
index - An INT that references the crew member index.
crewMem - A CrewMember enum that points to the crew member to be saved in the heist crew index.
)]]
[[sanScript(PROC #DEBUG_SET_RANDOM_CREW_FOR_HEIST#INT heistIndex#PURPOSE: Debug function to randomly fill a heist's selected crew with crew members of the correct type.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(PROC #SET_HEIST_END_SCREEN_POTENTIAL_TAKE#INT heistIndex, INT potentialTake#PURPOSE:
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
potentialTake - An int representing the maximum value (in dollars) that can be stolen on a heist.
)]]
[[sanScript(PROC #ADD_HEIST_END_SCREEN_STOLEN_ITEM#INT heistIndex, STRING itemDescription, INT itemValue#PURPOSE: Adds a stolen item to be displayed in a end screen's Stolen Items list.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
itemDescription - A STRING description of a stolen item.
itemValue - An INT representing the value of the stolen item being added to the end screen.
)]]
[[sanScript(PROC #ADD_HEIST_END_SCREEN_EXPENSE#INT heistIndex, STRING expenseDescription, INT expenseValue#PURPOSE: Adds a heist expense to be displayed in a end screen's Expenses list.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
expenseDescription - A STRING description of a heist expense.
expenseValue - An INT representing the value of the heist expense being added to the end screen.
)]]
[[sanScript(PROC #SET_HEIST_END_SCREEN_CREW_STATUS#INT heistIndex, CrewMember crewMem, CrewMemberStatus status#PURPOSE: Sets a crew member's status in a heist end screen. This will automatically add expenses if the crew member is INJURED or KIA.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
crewMem - A CrewMember ENUM pointing to the crew member who's status is to be set.
status - A CrewMemberStatus ENUM that details the status of the crew member.
)]]
[[sanScript(PROC #RESET_HEIST_END_SCREEN_DATA#INT heistIndex#PURPOSE: Resets any data that has already been setup for a heist end screen.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(PROC #START_CONFIGURING_HEIST_END_SCREEN#INT heistIndex#PURPOSE: Sets up a heist end screen to be configured. Must be called before any SET_HEIST_END_SCREEN_ and ADD_HEIST_END_SCREEN_ commands.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(PROC #FINISH_CONFIGURING_HEIST_END_SCREEN#INT heistIndex#PURPOSE: Finalises the configuration of a heist end screen. Should be called after any SET_HEIST_END_SCREEN_ and ADD_HEIST_END_SCREEN_ commands.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
)]]
[[sanScript(PROC #DISPLAY_HEIST_END_SCREEN#INT heistIndex, BOOL bSlideTransition#PURPOSE: Call this to display a heist end screen. The screen will transition in, wait for a button press, and then tranisiton out. The command will hang a script until the screen has transitioned out.
INFO: Author - Ben Rollinson
PARAM NOTES:
heistIndex - An index referencing a specific heist.
slideTransition - A BOOL that defines whether or not the end screen will transition on and off the screen by sliding or fading.
)]]
== script_xml ==
[[sanScript(FUNC BOOL #IS_XML_MENU_ON_SCREEN##PURPOSE: checks if menu is being drawn
)]]
[[sanScript(PROC #REMOVE_XML_MENU##PURPOSE: removes the xml menu from the screen
)]]
[[sanScript(PROC #SETUP_MISSION_XML_MENU#STRING xml, KEY_NUMBER key = KEY_R#PURPOSE: sets up the active mission xml menu
)]]
[[sanScript(PROC #CLEANUP_MISSION_XML_MENU##PURPOSE: cleans up the active mission xml menu
)]]
[[sanScript(FUNC INT #GET_MISSION_XML_VALUE##PURPOSE: returns an int if pressed on the mission menu
)]]
[[sanScript(PROC #GRAB_PREVIOUS_XML_MENU##)]]
[[sanScript(PROC #GRAB_NEXT_XML_MENU##)]]
[[sanScript(PROC #RESET_AND_RELOAD_XML_MENU##)]]
[[sanScript(FUNC BOOL #LOAD_COORD_XML#XML_COORDS_STRUCT &coordStruct, STRING xml#)]]
[[sanScript(PROC #UNLOAD_COORD_XML#XML_COORDS_STRUCT &coordStruct#)]]
[[sanScript(FUNC BOOL #GET_NEXT_COORD_FROM_XML#XML_COORDS_STRUCT &coordStruct, STRING node#)]]
[[sanScript(FUNC BOOL #GET_COORDS_AND_HEADINGS_FROM_XML#STRING xml, STRING node, VECTOR &coords[], FLOAT &headings[]#)]]
[[sanScript(FUNC BOOL #GET_COORDS_FROM_XML#STRING xml, STRING node, VECTOR &coords[]#)]]
[[sanScript(FUNC BOOL #LOAD_SPLINE_CAM_XML#XML_SPLINE_CAM_STRUCT &splineCamStruct, STRING xml#)]]
[[sanScript(PROC #UNLOAD_SPLINE_CAM_XML#XML_SPLINE_CAM_STRUCT &splineCamStruct#)]]
[[sanScript(FUNC BOOL #GET_NEXT_SPLINE_CAM_FROM_XML#XML_SPLINE_CAM_STRUCT &splineCamStruct, STRING node#)]]
[[sanScript(FUNC BOOL #GET_SPLINE_CAM_COORDS_FROM_XML#STRING xml, STRING node,#)]]
== selector_public ==
[[sanScript(FUNC enumCharacterList #GET_PLAYER_PED_ENUM_FROM_SELECTOR_SLOT#SELECTOR_SLOTS_ENUM eSlot# PURPOSE: Returns the ped enum equivalent to selector slot enum
)]]
[[sanScript(FUNC SELECTOR_SLOTS_ENUM #GET_SELECTOR_SLOT_FROM_PLAYER_PED_ENUM#enumCharacterList ePed# PURPOSE: Returns the selector slot equivalent to the ped enum
)]]
[[sanScript(FUNC VECTOR #GET_OFFSET_FOR_DEST_CAM#PED_INDEX ped# PURPOSE: Works out the offset vector for a destination cam based on the ZOOM_LEVEL
NOTE: Only to be used in selector_public.sch
)]]
[[sanScript(FUNC BOOL #test_cam_transition#SELECTOR_CAM_STRUCT &camDetails# PURPOSE: This is a temp debug func which tests the new START_CAM_TRANSITION command.
To use this in game, set the g_bUseTransitionCamera flag to TRUE in RAG>>Script>>Selector Globals.
)]]
[[sanScript(FUNC BOOL #RUN_CAM_SPLINE_FROM_PLAYER_TO_PED#SELECTOR_CAM_STRUCT &camDetails, FLOAT fDestCamRelativePitch = 0.0, FLOAT fDestCamRelativeHeading = 0.0, SELECTOR_CAM_INTERP_TYPE eInterpType = SELECTOR_CAM_DEFAULT# PURPOSE: Sets up a camera spline between player and ped.
NOTES: camDetails.camID will be created in this func unless the calling script has created a custom camera.
Calling script should set camDetails.pedTo to the ped that they want to hot-swap to.
If eInterpType is SELECTOR_CAM_DEFAULT then the interp type will be determined automatically.
Uses bool values to control the process and then returns FALSE when the spline is complete.
Should be called each frame from calling script until FALSE is returned.
)]]
[[sanScript(FUNC BOOL #RUN_CAM_SPLINE_FROM_PLAYER_TO_CAM#SELECTOR_CAM_STRUCT &camDetails# PURPOSE: Sets up a camera spline between player and scripted camera.
NOTES: camDetails.camID will be initialised/activated in this func.
Calling script should create a camera with valid coords/rot/fov etc. and assign it to camDetails.camTo.
Uses bool values to control the process and then returns FALSE when the spline is complete,
and the scripted camera becomes active.
Should be called each frame from calling script until FALSE is returned.
)]]
[[sanScript(FUNC BOOL #RUN_CAM_SPLINE_FROM_PLAYER_TO_SKY_CAM#SELECTOR_CAM_STRUCT &camDetails, FLOAT fSpeedMultiplier = 1.0# PURPOSE: Sets up a camera spline between player and a camera positioned in the sky
NOTES: camDetails.camID will be initialised/activated in this func.
Calling script should create a camera with valid coords/rot/fov etc. and assign it to camDetails.camSky.
Uses bool values to control the process and then returns FALSE when the spline is complete,
and the scripted camera becomes active.
Should be called each frame from calling script until FALSE is returned.
)]]
[[sanScript(FUNC BOOL #RUN_CAM_SPLINE_FROM_SKY_TO_PLAYER#SELECTOR_CAM_STRUCT &camDetails# PURPOSE: Sets up a camera spline between the active camer which should be in the sky and the player
NOTES: camDetails.camID will be initialised/activated in this func.
Calling script should ensure that camDetails.camSky is the current active camera.
Uses bool values to control the process and then returns FALSE when the spline is complete.
Should be called each frame from calling script until FALSE is returned.
)]]
[[sanScript(FUNC BOOL #TAKE_CONTROL_OF_SELECTOR_PED#SELECTOR_PED_STRUCT &selectorPeds, BOOL bCreateReplacementForPlayer = TRUE# PURPOSE: Changes the player ped to selectorPeds.pedID[selectorPeds.eNewSelectorPed]
NOTE: The players ped ID will be changed to the selector peds ped ID and vice versa
)]]
[[sanScript(FUNC BOOL #IS_SELECTOR_DISABLED## PURPOSE: Returns TRUE if the selector is disabled
)]]
[[sanScript(PROC #ENABLE_SELECTOR## PURPOSE: Allow the selector hud to operate
)]]
[[sanScript(PROC #DISABLE_SELECTOR## PURPOSE: Prevent the selector hud from working
)]]
[[sanScript(PROC #SET_SELECTOR_PED_HINT#SELECTOR_PED_STRUCT &sSelectorPeds, SELECTOR_SLOTS_ENUM ePed, BOOL bEnableHint = TRUE# PURPOSE: Sets the hint flag so that we can indicate who the player should select
)]]
[[sanScript(PROC #SET_SELECTOR_PED_BLOCKED#SELECTOR_PED_STRUCT &sSelectorPeds, SELECTOR_SLOTS_ENUM ePed, BOOL bBlockPed = TRUE# PURPOSE: Blocks the selector ped from being selected
)]]
[[sanScript(FUNC BOOL #CAN_SELECTOR_PED_BE_SELECTED#SELECTOR_SLOTS_ENUM ePed# PURPOSE: Checks to see if a selector ped can be selected
)]]
[[sanScript(FUNC BOOL #HAS_SELECTOR_PED_BEEN_SELECTED#SELECTOR_PED_STRUCT &sSelectorPeds, SELECTOR_SLOTS_ENUM eSelectedPed# PURPOSE: Checks to see if the specified player character is the same as the current selection
)]]
[[sanScript(FUNC BOOL #HAS_MULTIPLAYER_BEEN_SELECTED#SELECTOR_PED_STRUCT &sSelectorPeds# PURPOSE: Checks to see if the multiplayer option has been selected
)]]
[[sanScript(FUNC BOOL #MAKE_SELECTOR_PED_SELECTION#SELECTOR_PED_STRUCT &sSelectorPeds, SELECTOR_SLOTS_ENUM eSelectedPed # PURPOSE: Sets the enum of the ped we want to take control of
NOTE: This is the alternative to using the interface
)]]
[[sanScript(FUNC BOOL #MAKE_MULTIPLAYER_SELECTION#SELECTOR_PED_STRUCT &sSelectorPeds# PURPOSE: Sets the multiplayer flag to TRUE
NOTE: This is the alternative to using the interface
)]]
[[sanScript(FUNC BOOL #IS_SELECTOR_UI_SAFE_TO_DISPLAY#BOOL bSelectionEnabled = TRUE# PURPOSE: Returns TRUE if the selector UI can be displayed
)]]
[[sanScript(PROC #BLOCK_SELECTOR_CHARACTER_BUTTON_ACTION## PURPOSE: Block the selector buttons so that we dont perform any actions in game
)]]
[[sanScript(FUNC BOOL #IS_SELECTOR_UI_BUTTON_PRESSED## PURPOSE: Checks to see if player is currently pressing the selector UI button
RETURNS: TRUE if the player is pressing the button, FALSE if they are not
)]]
[[sanScript(FUNC BOOL #IS_SELECTOR_UI_BUTTON_JUST_PRESSED## PURPOSE: Checks to see if player has just pressed the selector UI button
RETURNS: TRUE if the player has just pressed the button, FALSE if they have not
)]]
[[sanScript(FUNC BOOL #IS_SELECTOR_PED_BUTTON_JUST_PRESSED#SELECTOR_SLOTS_ENUM ePed# PURPOSE: Checks to see if player has pressed the character selection button
RETURNS: TRUE if the player has pressed the button, FALSE if they are not
)]]
[[sanScript(PROC #GET_SELECTOR_PED_DETAILS_FOR_UI#SELECTOR_PED_STRUCT sSelectorPeds, SELECTOR_SLOTS_ENUM ePed, INT &iState, INT &iSlot, INT &iEnum, INT &iR, INT &iG, INT &iB# PURPOSE: Sets up the details of the character for the selector UI
)]]
[[sanScript(PROC #LOAD_SELECTOR_UI## PURPOSE: Requests the selector UI Scaleform movie
)]]
[[sanScript(PROC #CLEANUP_SELECTOR_UI## PURPOSE: Marks the selector UI as no longer needed and resets the globals
)]]
[[sanScript(PROC #MAINTAIN_SELECTOR_UI## PURPOSE: Requests the selector UI and keeps the globals up to date
)]]
[[sanScript(FUNC BOOL #UPDATE_SELECTOR_HUD#SELECTOR_PED_STRUCT &sSelectorPeds, BOOL bCheckPlayerIsInControl = TRUE, BOOL bCheckActivationButton = TRUE# PURPOSE: Draws the ped selector HUD and handles keypresses
NOTES: Updates the eNewSelectorPed and returns TRUE if the player has changed the current selection
DPADUP = MICHAEL, DPADLEFT = FRANKLIN, DPADRIGHT = TREVOR, DPADDOWN = MULTIPLAYER
)]]
[[sanScript(FUNC BOOL #SET_CURRENT_SELECTOR_PED#SELECTOR_SLOTS_ENUM eSlot, BOOL bCleanupModel = TRUE# PURPOSE: Forces the player to be a specific character without scripts having to create a selector ped
NOTE: This only works with SELECTOR_PED_MICHAEL, SELECTOR_PED_TREVOR, and SELECTOR_PED_FRANKLIN
)]]
== shop_public ==
[[sanScript(FUNC BOOL #IS_SHOP_BIT_SET#SHOP_NAME_ENUM eShop, INT iBitFlag# PURPOSE: Returns the TRUE if the bit flag is set for the current game mode
)]]
[[sanScript(PROC #SET_SHOP_BIT#SHOP_NAME_ENUM eShop, INT iBitFlag# PURPOSE: Sets the bit flag for the current game mode
)]]
[[sanScript(PROC #CLEAR_SHOP_BIT#SHOP_NAME_ENUM eShop, INT iBitFlag# PURPOSE: Clears the bit flag for the current game mode
)]]
[[sanScript(FUNC BOOL #HAS_DEFAULT_SHOP_DATA_BEEN_SET## PURPOSE: Returns TRUE if the default shop states have been set
)]]
[[sanScript(FUNC BOOL #IS_SHOP_AVAILABLE#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the specified shop is available at this point in the game
)]]
[[sanScript(FUNC BOOL #IS_SHOP_OPEN_FOR_BUSINESS#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the specified shop is currently open for business
)]]
[[sanScript(FUNC BOOL #IS_PLAYER_KICKING_OFF_IN_SHOP#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the player is kicking off in the specified shop
)]]
[[sanScript(FUNC BOOL #IS_SHOP_TEMPORARILY_UNAVAILABLE#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the shop is temporarily blocked
)]]
[[sanScript(FUNC BOOL #HAS_PLAYER_VISITED_SHOP#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the player has entered the specified shop before
)]]
[[sanScript(FUNC BOOL #HAS_PLAYER_PURCHASED_ITEM_FROM_SHOP#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the player has previously purchased an item from the specified shop
)]]
[[sanScript(FUNC BOOL #IS_SHOP_MULTIPLAYER_ONLY#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the shop should only run in multiplayer
)]]
[[sanScript(FUNC BOOL #IS_SHOP_SCRIPT_CURRENTLY_RUNNING#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if a script is currently running for the shop
)]]
[[sanScript(FUNC BOOL #IS_PLAYER_ALLOWED_TO_SHOOT_IN_SHOP#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the player is allowed to shoot in the specified shop
)]]
[[sanScript(FUNC BOOL #IS_SHOP_BEING_ROBBED#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the specified shop is currently being robbed
)]]
[[sanScript(FUNC BOOL #HAS_SHOP_RUN_ENTRY_INTRO#SHOP_NAME_ENUM eShop# PURPOSE: Returns TRUE if the specified shop has ran the entry intro
)]]
[[sanScript(PROC #SET_SHOP_IS_AVAILABLE#SHOP_NAME_ENUM eShop, BOOL bAvailable# PURPOSE: Updates the global which states if the specified shop is currently available at this point in the game
)]]
[[sanScript(PROC #SET_SHOP_IS_OPEN_FOR_BUSINESS#SHOP_NAME_ENUM eShop, BOOL bOpen# PURPOSE: Updates the global which states if the specified shop is currently open for business
)]]
[[sanScript(PROC #SET_PLAYER_IS_KICKING_OFF_IN_SHOP#SHOP_NAME_ENUM eShop, BOOL bKickingOff# PURPOSE: Updates the global which states if the player is currently kicking off in the specified shop
)]]
[[sanScript(PROC #SET_PLAYER_HAS_VISITED_SHOP#SHOP_NAME_ENUM eShop, BOOL bVisited# PURPOSE: Updates the global which states if the player has paid first visit to the specified shop
)]]
[[sanScript(PROC #SET_PLAYER_HAS_PURCHASED_ITEM_IN_SHOP#SHOP_NAME_ENUM eShop, BOOL bPurchasedItem# PURPOSE: Updates the global which states if the player has purchased an item from the specified shop
)]]
[[sanScript(PROC #SET_SHOP_IS_TEMPORARILY_UNAVAILABLE#SHOP_NAME_ENUM eShop, BOOL bUnavailable# PURPOSE: Updates the global which states if the shop is temporarily unavailable
)]]
[[sanScript(PROC #SET_SHOP_IS_MULTIPLAYER_ONLY#SHOP_NAME_ENUM eShop, BOOL bMultiplayer# PURPOSE: Updates the global which states if the shop is a multiplayer specific shop
)]]
[[sanScript(PROC #SET_SHOP_SCRIPT_IS_CURRENTLY_RUNNING#SHOP_NAME_ENUM eShop, BOOL bRunning# PURPOSE: Updates the global which states if a script is currently running for the shop
)]]
[[sanScript(PROC #SET_PLAYER_IS_ALLOWED_TO_SHOOT_IN_SHOP#SHOP_NAME_ENUM eShop, BOOL bAllowShooting# PURPOSE: Updates the global which states if the shop allows the player to shoot.
NOTE: This is intended for when the player is using the shooting range within the gun club shop.
)]]
[[sanScript(PROC #SET_SHOP_IS_BEING_ROBBED#SHOP_NAME_ENUM eShop, BOOL bBeingRobbed# PURPOSE: Updates the global which states if the shop is currently being robbed.
)]]
[[sanScript(PROC #SET_SHOP_HAS_RUN_ENTRY_INTRO#SHOP_NAME_ENUM eShop, BOOL bEntryIntroRun# PURPOSE: Updates the global which states if the shop entry intro has been run.
)]]
[[sanScript(FUNC STRING #GET_SHOP_NAME#SHOP_NAME_ENUM eShop# PURPOSE: Returns the text label for the shop name
)]]
[[sanScript(FUNC SHOP_TYPE_ENUM #GET_SHOP_TYPE_ENUM#SHOP_NAME_ENUM eShop# PURPOSE: Returns the related SHOP_TYPE_ENUM based on the SHOP_NAME_ENUM
)]]
[[sanScript(FUNC STATIC_BLIP_NAME_ENUM #GET_SHOP_BLIP_ENUM#SHOP_NAME_ENUM eShop# PURPOSE: Returns the approproate shop blip enum
)]]
[[sanScript(FUNC BLIP_SPRITE #GET_SHOP_BLIP_SPRITE#SHOP_NAME_ENUM eShop# PURPOSE: Returns the approproate blip sprite
)]]
[[sanScript(FUNC VECTOR #GET_SHOP_COORDS#SHOP_NAME_ENUM eShop# PURPOSE: Return the coords of the specified shop
)]]
[[sanScript(FUNC SHOP_NAME_ENUM #GET_CLOSEST_SHOP_OF_TYPE#VECTOR vCoords, SHOP_TYPE_ENUM eType = SHOP_TYPE_EMPTY, INT iRange = -1# PURPOSE: Returns the shop closest to the coords with the specified type
NOTE: Use -1 for iRange if you dont want to limit the distance check
Use SHOP_TYPE_EMPTY for eType to include all shop types in the search
)]]
== security_camera_public ==
[[sanScript(PROC #REQUEST_SECURITY_CAMERA_ASSETS##PURPOSE: Requests that all security camera models are streamed in.
INFO: Author - Ben Rollinson
)]]
[[sanScript(FUNC BOOL #HAVE_SECURITY_CAMERA_ASSETS_LOADED##PURPOSE: Checks that all security camera models have streamed in.
INFO: Author - Ben Rollinson
)]]
[[sanScript(PROC #RELEASE_SECURITY_CAMERA_ASSETS##PURPOSE: Releases all security camera models from memory.
INFO: Author - Ben Rollinson
)]]
[[sanScript(PROC #CREATE_SECURITY_CAMERA# SecurityCamera &sSecCam,#PURPOSE: Creates and configures a new security camera.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
vPosition - The base position of the camera.
fHeading - The default direction the camera will face.
fPitch - The angle that the camera is tilted (in degrees). NB. -ve angles will look towards the ground.
fTurnAngle - The angle through which the camera will scan across (in degrees).
iTurnTime - The time it will take for the camera to pan through it's full turning angle once.
fDetectionDistance - The maximum distance that the camera can detect peds from.
fFOV - The maximum viewing angle that the camera can detect peds in (in degrees).
iDetectionTime - The amount of time a ped can stand in view of the camera before it is alerted.
)]]
[[sanScript(PROC #ADD_SECURITY_CAMERA_DETECTABLE_PED#SecurityCamera &sSecCam, PED_INDEX ped#PURPOSE: Flags a ped to be detectable by the camera. The scripted security cameras will
only be alerted by peds that have been set as detectable.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
ped - The ped that is to be flagged as detectable by this camera.
)]]
[[sanScript(PROC #DELETE_SECURITY_CAMERA#SecurityCamera &sSecCam#PURPOSE: Destroys a security camera.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
[[sanScript(PROC #UPDATE_SECURITY_CAMERA#SecurityCamera &sSecCam#PURPOSE: The main security camera maintenance procedure. This should be called every
frame that a security camera is active in script.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
[[sanScript(PROC #SET_SECURITY_CAMERA_ALERTED#SecurityCamera &sSecCam#PURPOSE: Sets the camera to the alerted state.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
[[sanScript(PROC #SET_SECURITY_CAMERA_NOT_ALERTED#SecurityCamera &sSecCam#PURPOSE: Sets the camera to the not alerted state.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
[[sanScript(FUNC BOOL #HAS_SECURITY_CAMERA_BEEN_ALERTED#SecurityCamera &sSecCam#PURPOSE: Returns whether or not the camera has been alerted.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
[[sanScript(FUNC BOOL #HAS_SECURITY_CAMERA_BEEN_ALERTED_BY_PED#SecurityCamera &sSecCam, PED_INDEX ped#PURPOSE: Returns whether or not a specific ped has alerted the security camera.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
ped - The ped that is to be checked for detection by the camera.
)]]
[[sanScript(PROC #ACTIVATE_SECURITY_CAMERA_VIEW#SecurityCamera &sSecCam#PURPOSE: Activates a special scripted camera that represents what the security camera is seeing.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
[[sanScript(PROC #DEACTIVATE_SECURITY_CAMERA_VIEW#SecurityCamera &sSecCam#PURPOSE: Deactivates the camera view for the camera if it is currently active.
INFO: Author - Ben Rollinson
PARAM NOTES:
sSecCam - A STRUCT that represents the script created security camera.
)]]
== traffic ==
[[sanScript(FUNC MODEL_NAMES #DEFAULT_PED_MODEL##)]]
[[sanScript(FUNC MODEL_NAMES #DEFAULT_CAR_MODEL##)]]
[[sanScript(FUNC MODEL_NAMES #COP_CAR_MODEL##)]]
[[sanScript(FUNC MODEL_NAMES #COP_PED_MODEL##)]]
[[sanScript(PROC #MARK_CAR_AS_NO_LONGER_NEEDED_KEEP_ID#VEHICLE_INDEX inCar#)]]
[[sanScript(PROC #MARK_CHAR_AS_NO_LONGER_NEEDED_KEEP_ID#PED_INDEX inChar#)]]
[[sanScript(PROC #DONT_LET_UBER_PLAYBACK_CLEANUP_THIS_CAR#VEHICLE_INDEX &InCar#)]]
[[sanScript(PROC #SWITCH_ALL_RANDOM_CARS_OFF##)]]
[[sanScript(PROC #SWITCH_ALL_RANDOM_CARS_ON##)]]
[[sanScript(PROC #UPDATE_CAR_DENSITY_BASED_ON_PLAYERS_DISTANCE_FROM_CAR#VEHICLE_INDEX inCar, FLOAT fRadius = 250.0#)]]
[[sanScript(PROC #CREATE_ALL_WAITING_UBER_CARS##)]]
[[sanScript(FUNC BOOL #IS_POINT_VISIBLE_TO_PLAYER#VECTOR vPos, FLOAT fRadius, FLOAT fDistance = 100.0#)]]
[[sanScript(PROC #SAFE_CLEAR_AREA_OF_VEHICLES#VECTOR vPos, FLOAT fRadius#)]]
[[sanScript(FUNC BOOL #SAFELY_SET_VEHICLE_ON_GROUND_PROPERLY#VEHICLE_INDEX CarID#)]]
[[sanScript(FUNC INT #GET_FREE_ACTIVE_CAR_SLOT##)]]
[[sanScript(FUNC INT #GET_FREE_RECORDED_TRAFFIC_CAR_SLOT##)]]
[[sanScript(FUNC INT #GET_FREE_RECORDED_PARKED_CAR_SLOT##)]]
[[sanScript(PROC #MARK_TRAFFIC_CAR_AS_INACTIVE#VEHICLE_INDEX &InCarID#)]]
[[sanScript(PROC #MARK_TRAFFIC_CAR_AS_ACTIVE#VEHICLE_INDEX &InCarID#)]]
[[sanScript(FUNC FLOAT #GET_RECORDING_LENGTH#INT iRecNo#)]]
[[sanScript(PROC #CREATE_TRAFFIC_WIDGET##)]]
[[sanScript(FUNC FLOAT #GET_DISTANCE_FROM_LEAD_CAR#VEHICLE_INDEX LeadCar, VEHICLE_INDEX FollowCar#)]]
[[sanScript(FUNC FLOAT #GET_WIDE_DISTANCE_FROM_LEAD_CAR#VEHICLE_INDEX LeadCar, VEHICLE_INDEX FollowCar#)]]
[[sanScript(FUNC BOOL #IS_CAR_FURTHER_IN_FRONT_THAN_WIDE#VEHICLE_INDEX LeadCar, VEHICLE_INDEX FollowCar#)]]
[[sanScript(FUNC FLOAT #GET_CHAR_DISTANCE_FROM_LEAD_CAR#VEHICLE_INDEX LeadCar, PED_INDEX FollowChar#)]]
[[sanScript(FUNC FLOAT #GET_ACTUAL_CHAR_DISTANCE_FROM_LEAD_CAR#VEHICLE_INDEX LeadCar, PED_INDEX FollowChar#)]]
[[sanScript(FUNC FLOAT #GET_DIFF_IN_SPEED_HEADINGS_BETWEEN_CHAR_AND_LEAD_CAR#VEHICLE_INDEX LeadCar, PED_INDEX FollowChar#)]]
[[sanScript(FUNC BOOL #IS_CAR_IN_FRONT_OF_CAR#VEHICLE_INDEX inCar1, VEHICLE_INDEX inCar2#)]]
[[sanScript(FUNC BOOL #IS_PED_IN_FRONT_OF_CAR#PED_INDEX inPed, VEHICLE_INDEX inCar#)]]
[[sanScript(FUNC BOOL #ARE_CARS_TRAVELLING_IN_SAME_DIRECTION#VEHICLE_INDEX inCar1, VEHICLE_INDEX inCar2#)]]
[[sanScript(FUNC BOOL #ARE_CARS_TRAVELLING_IN_SAME_DIRECTION_BELOW_ANGLE#VEHICLE_INDEX inCar1, VEHICLE_INDEX inCar2, FLOAT fInAngle#)]]
[[sanScript(FUNC BOOL #DO_CAR_SPEEDS_DIFFER_BY_MORE_THAN#VEHICLE_INDEX inCar1, VEHICLE_INDEX inCar2, FLOAT fSpeedDiff#)]]
[[sanScript(PROC #DRAW_CAR_SPEED_VECTOR#VEHICLE_INDEX inCar#)]]
[[sanScript(FUNC BOOL #SHOULD_CAR_BE_PISSED_OFF_AT_CAR#VEHICLE_INDEX inCar, VEHICLE_INDEX inCar2#)]]
[[sanScript(PROC #PROCESS_TRAFFIC_CARS_FOR_HORN#VEHICLE_INDEX &TriggerCar#)]]
[[sanScript(PROC #PROCESS_TRAFFIC_CARS_FOR_FLASHING#VEHICLE_INDEX &TriggerCar#)]]
[[sanScript(FUNC BOOL #IS_CAR_IN_FRONT_OF_PED#VEHICLE_INDEX inCar1, PED_INDEX INPED2#)]]
[[sanScript(FUNC BOOL #START_CAR_PLAYBACK_NOW#VEHICLE_INDEX &InCar, INT iRec#)]]
[[sanScript(FUNC BOOL #SET_CAR_AT_END_OF_PLAYBACK#VEHICLE_INDEX &InCar, INT iRec#)]]
[[sanScript(FUNC BOOL #SET_CAR_AT_PLAYBACK_POSITION#VEHICLE_INDEX &InCar, INT iRec, FLOAT fTime, BOOL bPlay, BOOL bUseAI#)]]
[[sanScript(PROC #CALCULATE_OLD_PLAYBACK_SPEED_FROM_CHAR#VEHICLE_INDEX InCarID, PED_INDEX TargetCharID, FLOAT &fPlaybackSpeed, FLOAT fIdealChaseDist = 20.0, FLOAT fMinChaseDist = 5.0, FLOAT fMaxChaseDist = 40.0, FLOAT fMinPlaybackSpeed = 0.6, FLOAT fMaxPlaybackSpeed = 2.0, FLOAT fDefaultPlaybackSpeed = 1.0#)]]
[[sanScript(PROC #CALCULATE_NEW_PLAYBACK_SPEED_FROM_CHAR#VEHICLE_INDEX InCarID, PED_INDEX TargetCharID, FLOAT &fPlaybackSpeed, FLOAT fDefaultPlaybackSpeed = 1.0, FLOAT fMinDist = 5.0, FLOAT fIdealDist = 20.0, FLOAT fSlowDownDist = 125.0, FLOAT fMaxPlaybackSpeedMultiplier = 2.0, FLOAT fAirResistanceMultiplier = 1.0, FLOAT fCatchupSpeedMultiplier = 0.7, BOOL bDoAirResistance = TRUE#)]]
[[sanScript(PROC #CALCULATE_PLAYBACK_SPEED_FROM_CHAR#VEHICLE_INDEX InCarID, PED_INDEX TargetCharID, FLOAT &fPlaybackSpeed, FLOAT fIdealChaseDist = 20.0, FLOAT fMinChaseDist = 5.0, FLOAT fMaxChaseDist = 40.0, FLOAT fMinPlaybackSpeed = 0.6, FLOAT fMaxPlaybackSpeed = 2.0, FLOAT fDefaultPlaybackSpeed = 1.0 #)]]
[[sanScript(FUNC VECTOR #GET_FACE_NORMAL#FACE_STRUCT inFace#)]]
[[sanScript(FUNC VECTOR #GET_FACE_MIDPOINT#FACE_STRUCT inFace#)]]
[[sanScript(PROC #DRAW_FACE#FACE_STRUCT inFace#)]]
[[sanScript(FUNC BOOL #IS_POINT_BEHIND_FACE#VECTOR vInPoint, FACE_STRUCT inFace#)]]
[[sanScript(FUNC BOOL #IS_POINT_INSIDE_RECORDING_CONE#VECTOR vInPoint, VEHICLE_INDEX TriggerCar#)]]
[[sanScript(PROC #DRAW_RECORDING_CONE#VEHICLE_INDEX TriggerCar#)]]
[[sanScript(FUNC BOOL #HAS_TRAFFIC_CAR_BEEN_RECORDED#VEHICLE_INDEX &InCar#)]]
[[sanScript(FUNC BOOL #HAS_PARKED_CAR_BEEN_RECORDED#VEHICLE_INDEX &InCar#)]]
[[sanScript(FUNC BOOL #IS_TRAFFIC_CAR_GOOD_TO_RECORD#VEHICLE_INDEX InCar, VEHICLE_INDEX TriggerCar#)]]
[[sanScript(FUNC BOOL #IS_THIS_A_PARKED_CAR#VEHICLE_INDEX InCar#)]]
[[sanScript(FUNC BOOL #IS_PARKED_CAR_GOOD_TO_RECORD#VEHICLE_INDEX InCar, VEHICLE_INDEX TriggerCar#)]]
[[sanScript(FUNC VEHICLE_INDEX #FIND_TRAFFIC_CAR_TO_RECORD#VEHICLE_INDEX PlayerCar#)]]
[[sanScript(FUNC VEHICLE_INDEX #FIND_PARKED_CAR_TO_RECORD#VEHICLE_INDEX PlayerCar#)]]
[[sanScript(PROC #START_RECORDING_SET_PIECE_CAR#VEHICLE_INDEX inCar, VEHICLE_INDEX TriggerCar, BOOL bAllowOverwrite#)]]
[[sanScript(PROC #RECORD_TRAFFIC#VEHICLE_INDEX TriggerCar#)]]
[[sanScript(FUNC BOOL #IS_SET_PIECE_CAR_VALID#INT i#)]]
[[sanScript(FUNC BOOL #IS_TRAFFIC_CAR_VALID#INT i#)]]
[[sanScript(FUNC BOOL #IS_PARKED_CAR_VALID#INT i#)]]
[[sanScript(FUNC INT #LOWEST_SET_PIECE_CAR_TO_CONVERT##)]]
[[sanScript(PROC #OUTPUT_CLEANED_DATA##)]]
[[sanScript(PROC #MAKE_CAR_DRIVE_RANDOMLY#VEHICLE_INDEX inCar#)]]
[[sanScript(PROC #CHANGE_PLAYBACK_TO_USE_AI_AND_KEEP_SPEED#VEHICLE_INDEX inCar#)]]
[[sanScript(PROC #RECORD_PARKED_CARS#VEHICLE_INDEX TriggerCar#)]]
[[sanScript(FUNC BOOL #IS_ACTIVE_TRAFFIC_CAR_OBSTRUCTING_POINT#VECTOR inPos#)]]
[[sanScript(PROC #RECORD_CAR#VEHICLE_INDEX InCar, INT iRecNo#)]]
[[sanScript(FUNC BOOL #RECORD_PLAYERS_CAR_WITH_TRAFFIC##)]]
[[sanScript(PROC #STOP_RECORDING_PLAYERS_CAR_AND_TRAFFIC##)]]
[[sanScript(PROC #UPDATE_TRAFFIC_RECORDING##)]]
[[sanScript(PROC #DELETE_ANY_UBER_CAR_IN_AREA#VECTOR vPosition, FLOAT fRadius#)]]
[[sanScript(PROC #DELETE_ALL_TRAFFIC_CARS##)]]
[[sanScript(PROC #DELETE_ALL_PARKED_CARS##)]]
[[sanScript(PROC #DELETE_ALL_SET_PIECE_CARS##)]]
[[sanScript(PROC #DELETE_ALL_CARS_IN_UBER_PLAYBACK##)]]
[[sanScript(PROC #MARK_ALL_TRAFFIC_CARS_AS_NO_LONGER_NEEDED##)]]
[[sanScript(PROC #MARK_ALL_PARKED_CARS_AS_NO_LONGER_NEEDED##)]]
[[sanScript(PROC #MARK_ALL_SET_PIECE_CARS_AS_NO_LONGER_NEEDED##)]]
[[sanScript(PROC #FLUSH_ALL_TRAFFIC_DATA##)]]
[[sanScript(PROC #REMOVE_PARKED_CAR_FROM_PROCESSING#INT inID#)]]
[[sanScript(PROC #UPDATE_PARKED_CARS#VEHICLE_INDEX TriggerCar#)]]
[[sanScript(PROC #REMOVE_TRAFFIC_CAR_FROM_PROCESSING#INT inID, FLOAT fCruiseSpeed = MIN_CAR_CRUISE_SPEED#)]]
[[sanScript(PROC #UPDATE_TRAFFIC_PLAYBACK#VEHICLE_INDEX TriggerCar, FLOAT fPlaybackSpeed#)]]
[[sanScript(PROC #UPDATE_SET_PIECE_CARS#VEHICLE_INDEX TriggerCar, FLOAT fPlaybackSpeed#)]]
[[sanScript(PROC #INIT_UBER_RECORDING#STRING strNameOfUber#)]]
[[sanScript(PROC #UPDATE_UBER_RECORDING##)]]
[[sanScript(PROC #INITIALISE_UBER_PLAYBACK#STRING strNameOfUber, BOOL bClearCars = TRUE#)]]
[[sanScript(PROC #REGISTER_UBER_RECORDINGS##)]]
[[sanScript(PROC #SWITCH_ALL_ROADS_BACK_TO_ORIGINAL##)]]
[[sanScript(PROC #CLEANUP_UBER_PLAYBACK#BOOL bDeleteAllCars = FALSE#)]]
[[sanScript(PROC #SWITCH_ROADS_OFF_IN_PLAYBACK#VEHICLE_INDEX TriggerCar, FLOAT fTime#)]]
[[sanScript(PROC #SAFE_CLEAR_AREA_OF_CARS_IN_PLAYBACK#VEHICLE_INDEX TriggerCar, FLOAT fTime, FLOAT fRadius#)]]
[[sanScript(FUNC BOOL #HAS_UBER_PLAYBACK_BEEN_SKIPPED_TO_PLAYBACK_TIME#VEHICLE_INDEX &TriggerCar, FLOAT finResetTime#)]]
[[sanScript(PROC #DELETE_NO_LONGER_USED_UBER_CARS##)]]
[[sanScript(PROC #SET_UBER_PLAYBACK_TO_TIME_NOW#VEHICLE_INDEX TriggerCar, FLOAT finResetTime#)]]
[[sanScript(PROC #UPDATE_UBER_PLAYBACK#VEHICLE_INDEX TriggerCar, FLOAT fPlaybackSpeed#)]]
[[sanScript(FUNC BOOL #HAS_PLAYBACK_STOPPED_MOVING#VEHICLE_INDEX inCarID#)]]
== trains_control_public ==
[[sanScript(PROC #SCRIPT_SET_TRAIN_LINE_ACTIVE#TRAIN_LINE_ENUM trainLine, BOOL bActive#)]]
[[sanScript(PROC #Initialise_Train_Lines_On_Startup##)]]
[[sanScript(PROC #SET_TRAIN_LINE_ACTIVE#INT iTrainLine, BOOL bActive#)]]
[[sanScript(PROC #MAINTAIN_TRAIN_LINE_ACTIVATION##)]]
== cellphone_private ==
[[sanScript(PROC #Get_Cellphone_Owner##)]]
[[sanScript(PROC #Scaleform_Place_Items_on_Homescreen#INT CheckPrecedence#)]]
[[sanScript(PROC #format_medium_ostext#INT r, INT g, INT b, INT a#)]]
[[sanScript(PROC #format_cellcam_ostext#INT r, INT g, INT b, INT a#)]]
[[sanScript(PROC #format_cellcam_fs_ostext#INT r, INT g, INT b, INT a#)]]
[[sanScript(PROC #Call_Scaleform_Input_Keypress_Right##)]]
[[sanScript(PROC #Call_Scaleform_Input_Keypress_Left##)]]
[[sanScript(PROC #Call_Scaleform_Input_Keypress_Up##)]]
[[sanScript(PROC #Call_Scaleform_Input_Keypress_Down##)]]
[[sanScript(PROC #Play_Select_Beep##)]]
[[sanScript(PROC #Play_Back_Beep##)]]
[[sanScript(PROC #Set_SF_Buttons_to_OngoingCall##)]]
[[sanScript(PROC #Set_SF_Buttons_SuppText_For_ConnectedCall##)]]
[[sanScript(PROC #Update_Scaleform_VSE##)]]
[[sanScript(PROC #highlight_item##)]]
[[sanScript(PROC #Request_Load_Scriptstring#STRING scriptstring_to_load#)]]
[[sanScript(PROC #Fill_App_Sheet#enumApplicationList PassedApp, STRING PassedAppName, INT PassedAppInt, STRING PassedScriptName, INT PassedIconEnum, INT PassedPrecedence, enumAppAvailabilityOWNER1 PassedO1, enumAppAvailabilityOWNER2 PassedO2, enumAppAvailabilityOWNER3 PassedO3#)]]
[[sanScript(PROC #Fill_All_Secondary_App_Sheets##)]]
[[sanScript(PROC #Fill_All_Primary_App_Sheets##)]]
[[sanScript(PROC #Create_3dPhoneObject# #)]]
[[sanScript(PROC #Put_Cellphone_To_Ear##)]]
[[sanScript(PROC #Remove_Cellphone_From_Ear##)]]
[[sanScript(FUNC BOOL #IsFirstTimeNewerThanSecondTime#structTxtMsgTimeSent FirstTimeToCompare, structTxtMsgTimeSent SecondTimeToCompare#)]]
[[sanScript(PROC #ForceDeletionOfEarliestTextMessage##)]]
[[sanScript(PROC #ForceDeletionOfCompletedSidetask##)]]
[[sanScript(FUNC BOOL #CheckForTextMessageSpace##)]]
[[sanScript(FUNC BOOL #CheckForJobListSpace##)]]
[[sanScript(FUNC BOOL #CheckForSideTaskSpace##)]]
[[sanScript(PROC #SetTimeThatTextWasSent#INT WhichArraySlotNumber#)]]
[[sanScript(PROC #SetTimeThatJobWasSent#INT WhichArraySlotNumber#)]]
[[sanScript(PROC #SetTimeSideTaskWentLive#INT WhichArraySlotNumber#)]]
[[sanScript(FUNC BOOL #ProcessTextMessage# enumCharacterList WhichSender, STRING WhichTextLabel, enumTxtMsgLockedStatus WhichLockStatus, #)]]
[[sanScript(FUNC BOOL #ProcessLiveSideTask# enumCharacterList WhichSideTaskGiver, enumSideTaskList WhichSideTaskIdentifier, BOOL ShouldDisplayNewSideTaskSignifier = TRUE,#)]]
[[sanScript(PROC #Check_For_Ongoing_Call_Interruption##)]]
[[sanScript(PROC #Temporarily_Remove_Special_Case_Settings##)]]
[[sanScript(PROC #Restore_Special_Case_Settings##)]]
[[sanScript(PROC #draw_debug_screen_grid##)]]
[[sanScript(PROC #draw_debug_rectangle##)]]
[[sanScript(PROC #debug_3dphone_pos_rot##)]]
[[sanScript(FUNC BOOL #ProcessJobListEntry# enumCharacterList WhichSender, INT iMission, INT iInstance, STRING WhichTextLabel, enumJobListStatus WhichJobStatus, #)]]
== dialogue_private ==
[[sanScript(PROC #ClearConversationData##)]]
[[sanScript(PROC #ClearConversationPedsData##)]]
[[sanScript(PROC #CommonDialogueCleanup##)]]
[[sanScript(PROC #ConversationCleanup##)]]
[[sanScript(PROC #ScriptHungupAwayCleanup##)]]
[[sanScript(PROC #KillAllConversations##)]]
[[sanScript(PROC #KillFaceToFaceConversationImmediately##)]]
[[sanScript(PROC #KillPhoneConversation##)]]
[[sanScript(PROC #KillFaceToFaceConversation##)]]
[[sanScript(PROC #SetUpPhoneConversation##)]]
[[sanScript(FUNC BOOL #CheckCurrentConversationStatusForMultipart#STRING &WhichMPSegmentLabel[], STRING &WhichMPSpecificLabel[], #)]]
== population_zone ==
[[sanScript(PROC #Setup_Population_Types_For_Each_Map_Zone## PURPOSE:
Allows the population types to be associated with map zones.
)]]
== scumminess ==
[[sanScript(PROC #Setup_Scumminess_For_Each_Map_Zone## PURPOSE:
Allocates scripts to objects, peds, and world points.
)]]