GTAG - Modding - Opcode Database - 0AA8
Opcode Database
0AA8
Description | Calls a function from the class and stores the result to a variable which is always the last parameter. The principle of operation is similar to the opcodes 0AA6 and 0AA7[/opcode]. We call the function at address 0x4048E0 and pass the vehicle handle as a parameter to it in this example. Struct 0xB74494 is a collection of all in-game vehicles. 0x4048E0 is a function that converts the vehicle handle to its struct pointer (analogue of opcode 0A97). This pointer will be stored to the variable 0@. Parameters: 1 = address of called function. It may be the address inside the gta_sa.exe or inside a loaded dll. 2 = pointer to the class structure (can be obtained by the opcodes 0A96 - 0A98). 3 = number of parameters to pass 4 = number of parameters to be removed from the stack after the method execution. Commonly, the methods clean the stack themselves, so the pop parameter must equal to 0. |
---|---|
Parameters (v2) | 1) Memory address (Integer) (INT) 2) Memory address (Integer) (INT) 3) Integer (INT) 4) Integer (INT) 5) Call arguments (...) 6) (Returned) Any value (ANY) |
Games | |
Category | CLEO 3 |
San Andreas | |
sascm.ini | 0AA8=-1,call_method_return %1d% struct %2d% num_params %3h% pop %4h% |
Example | 0AA8: call_method_return 0x4048E0 struct 0xB74494 num_params 1 pop 0 params 0@ store_to 1@ |
Command Name | CALL_METHOD_RETURN |