07.10.2011, 20:31
well, I'm here with new problem xD
I got object that I spawn with /uavstart
And when I do /uavcontrol it should set camera on the object, so I look from air, bird perspective, but it doesn't do it :S
I got object that I spawn with /uavstart
And when I do /uavcontrol it should set camera on the object, so I look from air, bird perspective, but it doesn't do it :S
pawn Код:
new Float: Pos[4], Float: OPos[4], uavobj, UAVObject = 0, bool: UAVStarted;
YCMD:uavcontrol(playerid, params[], help)
{
#pragma unused help
#pragma unused params
if(UAVStarted == false) return SendClientMessage(playerid, 0xFF0000FF, "You didn't started UAV!");
TogglePlayerControllable(playerid, 0);
GetObjectPos(uavobj, OPos[0], OPos[1], OPos[2]);
SetPlayerCameraPos(playerid, OPos[0], OPos[1], OPos[2]);
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerCameraLookAt(playerid, OPos[0], OPos[1], OPos[2]);
SendClientMessage(playerid, 0x10F441AA, "You have started controlling the UAV!");
return 1;
}