User contributions for Danilo
Jump to navigation
Jump to search
23 November 2023
- 03:2203:22, 23 November 2023 diff hist 0 Template:Useful Functions move to table functions
14 November 2023
- 21:2821:28, 14 November 2023 diff hist +168 Modules/FileSystem/translator/scanDir fix code example current
2 November 2023
- 21:2821:28, 2 November 2023 diff hist −212 IsVehicleOnFire No edit summary current
11 July 2023
- 18:4718:47, 11 July 2023 diff hist +101 N Talk:IsPlayerACLAdmin Created page with "isPlayerInACL Is enough for ACL groups checks. Adding too specific functions is not what we want." current
28 January 2023
- 01:2801:28, 28 January 2023 diff hist −1 Famous crash offsets and their meaning →Resolving crashes related to custom models
- 01:2701:27, 28 January 2023 diff hist −2 Famous crash offsets and their meaning →Module = gta_sa.exe or proxy_sa.exe
3 October 2022
- 02:2102:21, 3 October 2022 diff hist −203 Talk:IsVehicleOnFire Blanked the page current Tag: Blanking
- 02:1902:19, 3 October 2022 diff hist +158 IsVehicleOnFire →Author
- 02:0802:08, 3 October 2022 diff hist −23 IsVehicleOnFire Improve function in order to work as meant
27 September 2022
- 01:5801:58, 27 September 2022 diff hist +203 N Talk:IsVehicleOnFire Created page with "Things to fix in this code: 1 - Function's return can be improved; it will only return false/true if the code executes the if statements 2 - < 300 Is not the actual value the vehicle starts going on fire"
26 August 2022
- 22:3622:36, 26 August 2022 diff hist −101 GetRealTime format the string to two digits with a proper programming standard current
3 July 2022
- 21:1121:11, 3 July 2022 diff hist −49 IsPlayerInACL →Code
24 January 2022
- 02:0402:04, 24 January 2022 diff hist −761 Modules/FileSystem/translator/open No edit summary current
- 02:0102:01, 24 January 2022 diff hist −1,077 Modules/FileSystem/createTranslator No edit summary current
23 January 2022
- 04:0304:03, 23 January 2022 diff hist +72 Modules/FileSystem/getDoBufferAllRaw No edit summary current
- 04:0204:02, 23 January 2022 diff hist +72 Modules/FileSystem/setDoBufferAllRaw No edit summary current
- 04:0204:02, 23 January 2022 diff hist +72 Modules/FileSystem/type No edit summary current
- 04:0104:01, 23 January 2022 diff hist +72 Modules/FileSystem/topointer No edit summary current
- 04:0004:00, 23 January 2022 diff hist +72 Modules/FileSystem/streamCompare No edit summary current
- 04:0004:00, 23 January 2022 diff hist +72 Modules/FileSystem/pathToFilename No edit summary current
- 03:5903:59, 23 January 2022 diff hist +72 Modules/FileSystem/copyStreamCount No edit summary current
- 03:5803:58, 23 January 2022 diff hist +72 Modules/FileSystem/copyStream No edit summary current
- 03:5803:58, 23 January 2022 diff hist +72 Modules/FileSystem/copyFile No edit summary current
- 03:5703:57, 23 January 2022 diff hist +72 Modules/FileSystem/createFileIterative No edit summary current
- 03:5603:56, 23 January 2022 diff hist +72 Modules/FileSystem/createMemoryFile No edit summary current
- 03:5403:54, 23 January 2022 diff hist +72 Modules/FileSystem/createRAMDisk No edit summary current
- 03:5303:53, 23 January 2022 diff hist +72 Modules/FileSystem/createTranslator No edit summary
- 03:3303:33, 23 January 2022 diff hist +73 Modules/FileSystem/translator/getPathProcessingMode No edit summary current
- 03:3303:33, 23 January 2022 diff hist +73 Modules/FileSystem/translator/setPathProcessingMode No edit summary current
- 03:3203:32, 23 January 2022 diff hist +73 Modules/FileSystem/translator/getOutbreakEnabled No edit summary current
- 03:3203:32, 23 January 2022 diff hist +73 Modules/FileSystem/translator/setOutbreakEnabled No edit summary current
- 03:3103:31, 23 January 2022 diff hist +73 Modules/FileSystem/translator/getFiles No edit summary current
- 03:3003:30, 23 January 2022 diff hist +73 Modules/FileSystem/translator/getDirs No edit summary current
- 03:3003:30, 23 January 2022 diff hist +73 Modules/FileSystem/translator/scanDirEx No edit summary current
- 03:3003:30, 23 January 2022 diff hist +73 Modules/FileSystem/translator/scanDir No edit summary
- 03:2903:29, 23 January 2022 diff hist +73 Modules/FileSystem/translator/absPathRoot No edit summary current
- 03:2903:29, 23 January 2022 diff hist +73 Modules/FileSystem/translator/absPath No edit summary current
- 03:2803:28, 23 January 2022 diff hist +73 Modules/FileSystem/translator/relPathRoot No edit summary current
- 03:2803:28, 23 January 2022 diff hist +73 Modules/FileSystem/translator/relPath No edit summary current
- 03:2703:27, 23 January 2022 diff hist +73 Modules/FileSystem/translator/stat No edit summary current
- 03:2703:27, 23 January 2022 diff hist +73 Modules/FileSystem/translator/size No edit summary current
- 03:2703:27, 23 January 2022 diff hist +73 Modules/FileSystem/translator/rename No edit summary current
- 03:2603:26, 23 January 2022 diff hist +73 Modules/FileSystem/translator/copy No edit summary current
- 03:2603:26, 23 January 2022 diff hist +73 Modules/FileSystem/translator/delete No edit summary current
- 03:2503:25, 23 January 2022 diff hist +73 Modules/FileSystem/translator/chdir No edit summary current
- 03:2503:25, 23 January 2022 diff hist +73 Modules/FileSystem/translator/createDir No edit summary current
- 03:2403:24, 23 January 2022 diff hist +73 Modules/FileSystem/translator/exists No edit summary current
- 03:2103:21, 23 January 2022 diff hist +73 Modules/FileSystem/translator/open No edit summary
- 03:1403:14, 23 January 2022 diff hist +67 Modules/FileSystem/file/isReadable No edit summary current
- 03:1303:13, 23 January 2022 diff hist +67 Modules/FileSystem/file/isWritable No edit summary current
- 03:1303:13, 23 January 2022 diff hist +67 Modules/FileSystem/file/flush No edit summary current
- 03:1203:12, 23 January 2022 diff hist +67 Modules/FileSystem/file/eof No edit summary current
- 03:1203:12, 23 January 2022 diff hist +67 Modules/FileSystem/file/seek No edit summary current
- 03:1103:11, 23 January 2022 diff hist +67 Modules/FileSystem/file/tell No edit summary current
- 03:1103:11, 23 January 2022 diff hist +67 Modules/FileSystem/file/stat No edit summary current
- 03:1003:10, 23 January 2022 diff hist +67 Modules/FileSystem/file/size No edit summary current
- 03:1003:10, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeBoolean No edit summary current
- 03:0903:09, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeDouble No edit summary current
- 03:0903:09, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeFloat No edit summary current
- 03:0703:07, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeUInt No edit summary current
- 03:0703:07, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeInt No edit summary current
- 03:0603:06, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeUShort No edit summary current
- 03:0603:06, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeShort No edit summary current
- 03:0603:06, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeUByte No edit summary current
- 03:0503:05, 23 January 2022 diff hist +67 Modules/FileSystem/file/writeByte No edit summary current
- 03:0503:05, 23 January 2022 diff hist +67 Modules/FileSystem/file/write No edit summary current
- 03:0403:04, 23 January 2022 diff hist +67 Modules/FileSystem/file/readBoolean No edit summary current
- 03:0403:04, 23 January 2022 diff hist +67 Modules/FileSystem/file/readDouble No edit summary current
- 03:0303:03, 23 January 2022 diff hist +67 Modules/FileSystem/file/readFloat No edit summary current
- 03:0303:03, 23 January 2022 diff hist +1 Modules/FileSystem/file/readUInt No edit summary current
- 03:0203:02, 23 January 2022 diff hist +66 Modules/FileSystem/file/readUInt No edit summary
- 03:0103:01, 23 January 2022 diff hist +67 Modules/FileSystem/file/readInt No edit summary current
- 03:0103:01, 23 January 2022 diff hist +67 Modules/FileSystem/file/readUShort No edit summary current
- 03:0103:01, 23 January 2022 diff hist +67 Modules/FileSystem/file/readShort No edit summary current
- 03:0003:00, 23 January 2022 diff hist +67 Modules/FileSystem/file/readUByte No edit summary current
- 02:5802:58, 23 January 2022 diff hist +67 Modules/FileSystem/file/readByte No edit summary current
- 02:5702:57, 23 January 2022 diff hist +67 Modules/FileSystem/file/read No edit summary current
19 January 2022
- 03:5103:51, 19 January 2022 diff hist +1,368 N Modules/FileSystem/file/functions Created page with "==FileSystem File Functions== *read *readByte *readUByte *readShort *readUShort *readInt *readUInt *readFloat *Modules/FileSystem/file/readDouble|readDoub..."
- 03:4903:49, 19 January 2022 diff hist +1,290 N Modules/FileSystem/file/isReadable Created page with "__NOTOC__ This function returns whether a stream is readable. If a stream is not readable, then all read operations should result in nil operations (they will return zero bytes read or false if value reading). This state should be immutable across the lifetime of a file/stream class. ==Syntax== <syntaxhighlight lang="lua"> boolean file:isReadable () </syntaxhighlight> ==Returns== Returns '''true''' if the file/stream is readable, '''false''' otherwise. ==Example== <se..."
- 03:4903:49, 19 January 2022 diff hist +1,120 N Modules/FileSystem/file/isWritable Created page with "__NOTOC__ This function returns whether a stream is writable. If a stream is not writable, then all write operations should result in nil operations (they will return zero bytes written). This state should be immutable across the lifetime of a file/stream class. ==Syntax== <syntaxhighlight lang="lua"> boolean file:isWritable () </syntaxhighlight> ==Returns== Returns '''true''' if the file/stream is writable, '''false''' otherwise. ==Example== <section name="Client" cl..."
- 03:4803:48, 19 January 2022 diff hist +1,548 N Modules/FileSystem/file/flush Created page with "__NOTOC__ This function writes all temporary buffers of a file/stream object into the output storage. This feature shall be interpreted as a hint, not a necessity. Implementations do not have to support this feature. ==Syntax== <syntaxhighlight lang="lua"> boolean file:flush () </syntaxhighlight> ==Returns== Returns '''true''' if the file/stream has been successfully flushed, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> This sn..."
- 03:4703:47, 19 January 2022 diff hist +1,530 N Modules/FileSystem/file/eof Created page with "__NOTOC__ This function returns whether the runtime can still read data from the file/stream. This is an implementation defined state that should return false if no data can be immediately received using '''read operations'''. Asynchronous file/stream objects could use this function to return true when new data is available to receive from the socket. If wanting to read an entire file/stream object, this function is more reliable than the MTA:Eir/FileSystem/file/size|f..."
- 03:4703:47, 19 January 2022 diff hist +1,464 N Modules/FileSystem/file/seek Created page with "__NOTOC__ This function changes the location of the current stream pointer. Like that you can skip file sections, set the stream pointer to a specific location or head to the end of the file/stream object. Not all stream classes have to support this operation. ==Syntax== <syntaxhighlight lang="lua"> int file:seek ( int offset, string mode ) </syntaxhighlight> ==Arguments== *'''offset:''' the amount of bytes that should be used for the seeking operation *'''mode:''' a s..."
- 03:4603:46, 19 January 2022 diff hist +1,148 N Modules/FileSystem/file/tell Created page with "__NOTOC__ This function returns the current absolute position inside of the file/stream object. It should be the number of bytes that the current stream pointer is set from the beginning of the object. Not all stream classes have to support this operation. ==Syntax== <syntaxhighlight lang="lua"> int file:tell () </syntaxhighlight> ==Returns== Returns the amount of bytes that this file/stream object has already traversed. If the operation is not supported by the underly..."
- 03:4603:46, 19 January 2022 diff hist +412 N Modules/FileSystem/file/stat Created page with "__NOTOC__ This function returns immediate statistics about this file/stream object. The output should be of same structure like that of translator.stat. ==Syntax== <syntaxhighlight lang="lua"> dictionary file:stat () </syntaxhighlight> ==Returns== Returns a dictionary that contains the immediate file statistics. ==Example== todo. {{:Modules/FileSystem/file/functions}}"
- 03:4503:45, 19 January 2022 diff hist +1,011 N Modules/FileSystem/file/size Created page with "__NOTOC__ This function returns the size of a specific file/stream from beginning to end. Not all streams have to support this operation. ==Syntax== <syntaxhighlight lang="lua"> int file:size () </syntaxhighlight> ==Returns== Returns the amount of bytes that this file/stream object is made of. ==Example== <section name="Client" class="client" show="true"> This snippet returns the contents of a file in a string buffer. <syntaxhighlight lang="lua"> local function fileGe..."
- 03:4403:44, 19 January 2022 diff hist +541 N Modules/FileSystem/file/writeBoolean Created page with "__NOTOC__ This function attempts to write a boolean into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be one. ==Syntax== <syntaxhighlight lang="lua"> int file:writeBoolean ( boolean value ) </syntaxhighlight> ==Arguments== *'''value:''' a boolean value to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Returns '''false''' if '''value''' is not a valid bool..."
- 03:4403:44, 19 January 2022 diff hist +627 N Modules/FileSystem/file/writeDouble Created page with "__NOTOC__ This function attempts to write a double into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be eight. ==Syntax== <syntaxhighlight lang="lua"> int file:writeDouble ( double value ) </syntaxhighlight> ==Arguments== *'''value:''' a number to write into the file/stream using '''double floating point precision'''; this is the highest precision and range possible ==Returns== Returns the amount of bytes writ..."
- 03:4303:43, 19 January 2022 diff hist +573 N Modules/FileSystem/file/writeFloat Created page with "__NOTOC__ This function attempts to write a float into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:writeFloat ( float value ) </syntaxhighlight> ==Arguments== *'''value:''' a number to write into the file/stream using '''single floating point precision''' ==Returns== Returns the amount of bytes written during the write operation. Returns '''false''' if..."
- 03:4303:43, 19 January 2022 diff hist +39 Modules/FileSystem/file/writeUInt No edit summary
- 03:4203:42, 19 January 2022 diff hist +540 N Modules/FileSystem/file/writeUInt Created page with "__NOTOC__ This function attempts to write an unsigned integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:writeUInt ( unsigned_int value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [0..4294967295] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Returns '''false..."
- 03:4203:42, 19 January 2022 diff hist +570 N Modules/FileSystem/file/writeInt Created page with "__NOTOC__ This function attempts to write an integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:writeInt ( int value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [-2147483648..2147483647] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Returns '''false''' if ''..."
- 03:4103:41, 19 January 2022 diff hist +576 N Modules/FileSystem/file/writeUShort Created page with "__NOTOC__ This function attempts to write an unsigned short integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be two. ==Syntax== <syntaxhighlight lang="lua"> int file:writeUShort ( unsigned_short value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [0..65535] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Return false..."
- 03:4003:40, 19 January 2022 diff hist +505 N Modules/FileSystem/file/writeShort Created page with "__NOTOC__ This function attempts to write a short integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be two. ==Syntax== <syntaxhighlight lang="lua"> int file:writeShort ( short value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [-32786..32785] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. ==Example== todo. {{:Modul..."
- 03:4003:40, 19 January 2022 diff hist +507 N Modules/FileSystem/file/writeUByte Created page with "__NOTOC__ This function attempts to write an unsigned byte into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be one. ==Syntax== <syntaxhighlight lang="lua"> int file:writeUByte ( unsigned_byte value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [0..255] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. ==Example== todo. {{:Mod..."
- 03:3903:39, 19 January 2022 diff hist +504 N Modules/FileSystem/file/writeByte Created page with "__NOTOC__ This function attempts to write a signed byte into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be one. ==Syntax== <syntaxhighlight lang="lua"> int file:writeByte ( signed_byte value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [-128..127] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. ==Example== todo. {{:Module..."
- 03:3803:38, 19 January 2022 diff hist +2,435 N Modules/FileSystem/file/write Created page with "__NOTOC__ This function attempts to write a string of bytes (characters) into the file. It returns the amount of bytes that have actually been written. ==Syntax== <syntaxhighlight lang="lua"> int file:write ( string dataString ) </syntaxhighlight> ==Arguments== *'''dataString:''' the string of data that should be written into the file ==Returns== Returns the amount of bytes that have been actually written into the file. Returns false if '''dataString''' is not a valid..."
- 03:3703:37, 19 January 2022 diff hist +4,765 N Modules/FileSystem/file/readBoolean Created page with "__NOTOC__ This function attempts to read a boolean (native type) from a file and return it. The amount of bytes read should be one. ==Syntax== <syntaxhighlight lang="lua"> boolean file:readBoolean () </syntaxhighlight> ==Returns== Returns a boolean if it was successfully read from the file, '''nil''' otherwise. ==Example== <section name="Client" class="client" show="true"> This snippet demonstrates a variable file format that stores player properties depending on whet..."
- 03:3603:36, 19 January 2022 diff hist +2,851 N Modules/FileSystem/file/readDouble Created page with "__NOTOC__ This function attempts to read a double (native type) from a file and return it. The amount of bytes read should be eight. ==Syntax== <syntaxhighlight lang="lua"> double file:readDouble () </syntaxhighlight> ==Returns== Returns a double if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Server" class="server" show="true"> This snippet demonstrates a basic binary object map format. It can be extended to support more p..."
- 03:3503:35, 19 January 2022 diff hist +7,589 N Modules/FileSystem/file/readFloat Created page with "__NOTOC__ This function attempts to read a float (native type) from a file and return it. The amount of bytes read should be four. ==Syntax== <syntaxhighlight lang="lua"> float file:readFloat () </syntaxhighlight> ==Returns== Returns a float if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Server" class="server" show="true"> This snippet demonstrates a binary vehicle handling format. This saves space in comparison to a .XML..."