PageTemplateSyntax: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
No edit summary
Line 43: Line 43:
|Syntax: '''type name description''' or '''[type name = defaultValue]'''.<br>For an optional argument, use [] around the type and name and use '''= value''' for the default value.
|Syntax: '''type name description''' or '''[type name = defaultValue]'''.<br>For an optional argument, use [] around the type and name and use '''= value''' for the default value.
|arg1 = Element element The element that is about to be destroyed.<br>arg1 = [Element element = localClient.player] Example description.
|arg1 = Element element The element that is about to be destroyed.<br>arg1 = [Element element = localClient.player] Example description.
|-
|return
|function, method
|The return information, for a successful result.
|Syntax: '''type description'''.
|void<br>int Description goes here.
|-
|freturn
|function, method
|The return information, for a failed result.
|Syntax: '''type''' or '''type value'''.
|void<br>int -1
|-
|note or<br>note(2-20)
|all
|
|A note for the page.
|note = Text goes here.<br>note2 = Text goes here.
|-
|cancel
|event
|true, false
|Whether the event can be cancelled.
|cancel = true
|}
|}

Revision as of 18:31, 29 November 2022

Template Name: ScriptItem2

Field Name Page Type Values Notes Examples
name all name of the function/event Including namespaces if applicable, excluding class name if object oriented name = gta.createBlip
side all server, client, or shared side = shared
type all function, method, variable, property, event Use event for events, use method/property when object oriented, use function/variable otherwise type = function
games all iii vc sa iv Game support. One or multiple are supported. Delimit games by a space. games = iii vc sa iv
desc all description of the item For events, text is automatically added to the start: "The event-name event is invoked when"
Otherwise, text is automatically added to the start: "The item-name item-type is used to"
A full stop is added to the end of the description if the description doesn't end in one already.
desc = an element is destroyed
arg(1-20) function, method, event An argument. Syntax: type name description or [type name = defaultValue].
For an optional argument, use [] around the type and name and use = value for the default value.
arg1 = Element element The element that is about to be destroyed.
arg1 = [Element element = localClient.player] Example description.
return function, method The return information, for a successful result. Syntax: type description. void
int Description goes here.
freturn function, method The return information, for a failed result. Syntax: type or type value. void
int -1
note or
note(2-20)
all A note for the page. note = Text goes here.
note2 = Text goes here.
cancel event true, false Whether the event can be cancelled. cancel = true