11.02.2014, 16:34
(
Последний раз редактировалось DenZarock; 11.02.2014 в 17:14.
)
This is what you need to do.
Open:
\pawno\include\YSI\y_als\impl.inc
Find:
Change to:
Save file and close.
Open:
\pawno\include\YSI\y_hooks\impl.inc
Find:
Change to:
Save file and close.
Now compile!
(Sorry for Bad English! :S)
Open:
\pawno\include\YSI\y_als\impl.inc
Find:
pawn Код:
#define ALS_DO_UnoccupiedVehicleUpdate<%0> %0<UnoccupiedVehicleUpdate,iii>(more:vehicleid,more:playerid,end:passenger_seat)
pawn Код:
#define ALS_DO_UnoccupiedVehicleUpdate<%0> %0<UnoccupiedVehicleUpdate,iiifff>(more:vehicleid,more:playerid,more:passenger_seat,Float:new_x,Float:new_y,end_Float:new_z)
Open:
\pawno\include\YSI\y_hooks\impl.inc
Find:
pawn Код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
P:2("Hooks_OnUnoccupiedVehicleUpdate called: %d, %d, %d", vehicleid, playerid, passenger_seat);
new
end = _:YSI_g_sCallbackEnd[ALS_OnUnoccupiedVehicleUpdate],
start = _:YSI_g_sCallbackStart[ALS_OnUnoccupiedVehicleUpdate],
ret = ALS_R_UnoccupiedVehicleUpdate;
while (start++ != end)
{
#emit PUSH.S passenger_seat
#emit PUSH.S playerid
#emit PUSH.S vehicleid
// I wonder if I could hack the stack with a negative number so that when
// the called function returns it puts all the header data BACK on to the
// stack instead of removing the parameters and header.
#emit PUSH.C 12
#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;
}
pawn Код:
public OnUnoccupiedVehicleUpdate(vehicleid,playerid,passenger_seat,Float:new_x,Float:new_y,Float:new_z)
{
P:2("Hooks_OnUnoccupiedVehicleUpdate called: %d, %d, %d, %f, %f, %f", vehicleid, playerid, passenger_seat, new_x, new_y, new_z);
new
end = _:YSI_g_sCallbackEnd[ALS_OnUnoccupiedVehicleUpdate],
start = _:YSI_g_sCallbackStart[ALS_OnUnoccupiedVehicleUpdate],
ret = ALS_R_UnoccupiedVehicleUpdate;
while (start++ != end)
{
#emit PUSH.S new_z
#emit PUSH.S new_y
#emit PUSH.S new_x
#emit PUSH.S passenger_seat
#emit PUSH.S playerid
#emit PUSH.S vehicleid
// I wonder if I could hack the stack with a negative number so that when
// the called function returns it puts all the header data BACK on to the
// stack instead of removing the parameters and header.
#emit PUSH.C 24
#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;
}
Now compile!
(Sorry for Bad English! :S)