Opcode Database

Latest Forum Activity

GTAG - Modding - Opcode Database - 0AA8

Opcode Database

0AA8

DescriptionCalls 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)
Gamessa
CategoryCLEO 3
San Andreas
sascm.ini0AA8=-1,call_method_return %1d% struct %2d% num_params %3h% pop %4h%
Example0AA8: call_method_return 0x4048E0 struct 0xB74494 num_params 1 pop 0 params 0@ store_to 1@
Command NameCALL_METHOD_RETURN

<< 0AA7

0AA9 >>