PageTemplateSyntax: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
|all | |all | ||
|required | |required | ||
|server, client, | |server, client, shared | ||
| | | | ||
|side = shared | |side = shared | ||
Line 42: | Line 42: | ||
|required | |required | ||
|iii vc sa iv | |iii vc sa iv | ||
|Game support. | |[[GamesAndVersions|Game support]]. Separated by spaces. | ||
|games = iii vc sa iv | |games = iii vc sa iv | ||
|- | |||
|offline | |||
|all | |||
|optional | |||
|true/false | |||
|Whether the function works when '''not''' connected to a server | |||
|offline = true | |||
|- | |||
|online | |||
|all | |||
|optional | |||
|true/false | |||
|Whether the function works when connected to a server | |||
|online= true | |||
|- | |- | ||
|desc | |desc | ||
Line 76: | Line 90: | ||
|event | |event | ||
|required | |required | ||
|true | |true/false | ||
|Whether the event can be cancelled. | |Whether the event can be cancelled. | ||
|cancel = true | |cancel = true | ||
Line 83: | Line 97: | ||
|variable, property | |variable, property | ||
|required | |required | ||
|true | |true/false | ||
|Whether the variable/property is readonly. | |Whether the variable/property is readonly. | ||
|readonly = true | |readonly = true | ||
Line 110: | Line 124: | ||
|cb(1-20)text | |cb(1-20)text | ||
|method, function, event | |method, function, event | ||
|optional | |optional | ||
|Text | |Text | ||
|Extra description for the callback argument. | |Extra description for the callback argument. | ||
Line 117: | Line 131: | ||
|cb(1-20)arg(1-20) | |cb(1-20)arg(1-20) | ||
|method, function, event | |method, function, event | ||
| | |optional | ||
|A callback argument. | |A callback argument. | ||
|Syntax: '''type name description'''. | |Syntax: '''type name description'''. | ||
|arg1 = | |arg1 = Client client The element's syncer | ||
|- | |- | ||
|} | |} |
Latest revision as of 03:18, 5 September 2025
Template Name: ScriptItem2
Field Name | Page Type | Status | Values | Notes | Examples |
---|---|---|---|---|---|
name | all | required | name of the function/event | Including namespaces if applicable, excluding class name if object oriented | name = gta.createBlip |
class | method, property | required | name of the class | class = Element | |
side | all | required | server, client, shared | side = shared | |
type | all | required | function, method, variable, property, event | Use event for events, use method/property when object oriented, use function/variable otherwise | type = function |
games | all | required | iii vc sa iv | Game support. Separated by spaces. | games = iii vc sa iv |
offline | all | optional | true/false | Whether the function works when not connected to a server | offline = true |
online | all | optional | true/false | Whether the function works when connected to a server | online= true |
desc | all | required | 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 | required if over 0 args | 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 | required | The return information, for a successful result. | Syntax: type description. | void int Description goes here. |
freturn | function, method | required | The return information, for a failed result. | Syntax: type or type value. | void int -1 |
cancel | event | required | true/false | Whether the event can be cancelled. | cancel = true |
readonly | variable, property | required | true/false | Whether the variable/property is readonly. | readonly = true |
note note(2-20) |
all | optional | A note for the page. | note = Text goes here. note2 = Text goes here. | |
compat compat(1-20) |
all | optional | Compatibility information. | compat1 = Text goes here. | |
example exampleJS exampleLua exampleSquirrel exampleJSSS exampleJSCS exampleLuaSS exampleLuaCS exampleSquirrelJS exampleSquirrelCS |
all | optional | Code. | exampleJS = code here | |
cb(1-20)text | method, function, event | optional | Text | Extra description for the callback argument. | arg1 = function Arg1Name Arg 1 description. cb1text = Extra callback description here. |
cb(1-20)arg(1-20) | method, function, event | optional | A callback argument. | Syntax: type name description. | arg1 = Client client The element's syncer |