27.09.2015, 06:44
Quote:
|
Suggestion:
SetPlayerCameraPos (hooked, if the player is in flymode set the object's position instead) EDIT: In the old flymode we could set the object position and it would work. I just tried that with this and it locks the camera above the mansion. Other Suggestion: Just more script-wise manipulation. I was hoping for more of something like this, but with flymode. You could modify the SetPlayerCamera function to allow position and lookat parameters, that would be perfectly fine. I tried doing it like this: https://github.com/Crayder/Fly-Camer...ter/flycam.inc But that doesn't allow the camera to move. |
If your code doesn't work, that maybe because of OnPlayerUpdate, due to regular checks done there. Maybe this works:
pawn Код:
stock Cam_SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z) {
if (g_FlyMode[playerid][flyType] != 0) {
new
iFlyType = g_FlyMode[playerid][flyType]
;
g_FlyMode[playerid][flyType] = 0;
StopDynamicObject(g_FlyMode[playerid][flyObject]);
SetDynamicObjectPos(g_FlyMode[playerid][flyObject], x, y, z);
g_FlyMode[playerid][flyType] = iFlyType;
return true;
}
else {
return SetPlayerCameraPos(playerid, x, y, z);
}
}
#if defined _ALS_SetPlayerCameraPos
#undef SetPlayerCameraPos
#else
#define _ALS_SetPlayerCameraPos
#endif
#define SetPlayerCameraPos Cam_SetPlayerCameraPos
pawn Код:
SetPlayerCamera(playerid, 1);
SetPlayerCameraPos(playerid, ...);


