12.04.2009, 11:22
Hello!
A few minutes ago I started a new script. And now I wonder if this is wrong-wrotten or bugged.
It'd have to set the player's camera to look behind his vehicle.
It compiles with no errors, but when I try it ingame, it sets the camera to a weird place.
A few minutes ago I started a new script. And now I wonder if this is wrong-wrotten or bugged.
It'd have to set the player's camera to look behind his vehicle.
pawn Код:
if(ispassenger)
{
Variable1[playerid] = vehicleid;
new Float:X, Float:Y, Float:Z, Float:behindX, Float:behindY;
GetVehiclePos(vehicleid, X, Y, Z);
GetXYBehindVehicle(RearGunnerVeh[playerid], behindX, behindY, 10.0);
SetPlayerPos(playerid, X, Y, Z);
SetPlayerCameraLookAt(playerid, behindX, behindY, Z);
Variable2[playerid] = 1;
SendClientMessage(playerid, LIGHTBLUE, "Hold tight!");
SendClientMessage(playerid, YELLOW, "Press vehicle enter/exit key to exit the rear gunner position!");
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
Wut = SetTimerEx("Wuteva", 500, true, "i", playerid);
}