Guten Abend,
ich habe leider gerade ein Bug entdeckt bei diesem Filterscript, und zwar ist mir aufgefallen, das nachdem man die Preview anschaut, sich kein Dialog öffnet, wenn man nicht ID 0 ist.
Dabei hat der Scripter folgenden Fehler gemacht:
forward PreviewMovement(playerid);
public PreviewMovement(playerid)
{
IsCamMoving[playerid] = true;
DestroyObject(noclipdata[playerid][flyobject]);
SetCameraBehindPlayer(playerid);
if(coordInfo[playerid][MoveSpeed] > coordInfo[playerid][RotSpeed])
MenuTimer = SetTimer("ShowPlayerMenu", coordInfo[playerid][MoveSpeed], 0);
else
MenuTimer = SetTimer("ShowPlayerMenu", coordInfo[playerid][RotSpeed], 0);
InterpolateCameraPos(playerid, coordInfo[playerid][StartX], coordInfo[playerid][StartY], coordInfo[playerid][StartZ], coordInfo[playerid][EndX], coordInfo[playerid][EndY], coordInfo[playerid][EndZ],coordInfo[playerid][MoveSpeed]);
InterpolateCameraLookAt(playerid, coordInfo[playerid][StartLookX],coordInfo[playerid][StartLookY],coordInfo[playerid][StartLookZ],coordInfo[playerid][EndLookX],coordInfo[playerid][EndLookY],coordInfo[playerid][EndLookZ],coordInfo[playerid][RotSpeed]);
return 1;
}
Er gibt die PlayerID an "ShowPlayerMenu" nicht weiter, somit wird "0" verwendet.
Der richtige Code für ShowPlayerMenu ist also dieser:
forward PreviewMovement(playerid);
public PreviewMovement(playerid)
{
IsCamMoving[playerid] = true;
DestroyObject(noclipdata[playerid][flyobject]);
SetCameraBehindPlayer(playerid);
if(coordInfo[playerid][MoveSpeed] > coordInfo[playerid][RotSpeed])
MenuTimer = SetTimerEx("ShowPlayerMenu", coordInfo[playerid][MoveSpeed], 0, "i", playerid);
else
MenuTimer = SetTimerEx("ShowPlayerMenu", coordInfo[playerid][RotSpeed], 0, "i", playerid);
InterpolateCameraPos(playerid, coordInfo[playerid][StartX], coordInfo[playerid][StartY], coordInfo[playerid][StartZ], coordInfo[playerid][EndX], coordInfo[playerid][EndY], coordInfo[playerid][EndZ],coordInfo[playerid][MoveSpeed]);
InterpolateCameraLookAt(playerid, coordInfo[playerid][StartLookX],coordInfo[playerid][StartLookY],coordInfo[playerid][StartLookZ],coordInfo[playerid][EndLookX],coordInfo[playerid][EndLookY],coordInfo[playerid][EndLookZ],coordInfo[playerid][RotSpeed]);
return 1;
}
MFG,
Shanon.