08.06.2015, 21:06
Код:
public OnVehicleDeath(vehicleid, killerid) { P:2("Hooks_OnVehicleDeath called: %d, %d", vehicleid, killerid); new end = _:YSI_g_sCallbackEnd[ALS_OnVehicleDeath], start = _:YSI_g_sCallbackStart[ALS_OnVehicleDeath], ret = ALS_R_VehicleDeath; while (start++ != end) { #emit PUSH.S killerid #emit PUSH.S vehicleid #emit PUSH.C 8 #emit CONST.alt YSI_g_sCallbackAddresses #emit LOAD.S.pri start //#emit INC.pri //#emit STOR.S.pri start #emit LIDX #emit MOVE.alt #emit LCTRL 6 #emit ADD.C 24 #emit PUSH.pri #emit MOVE.pri #emit SCTRL 6 #emit MOVE.alt #emit CONST.pri 0xFFFFFFFE #emit AND #emit PUSH.pri #emit LOAD.S.pri ret #emit AND #emit POP.alt #emit OR #emit STOR.S.pri ret if (ret < 0) return ret + 1; } return ret; }