GetObjectPos, SetPlayerCamerPos
#1

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
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;
}
Reply


Messages In This Thread
GetObjectPos, SetPlayerCamerPos - by System64 - 07.10.2011, 20:31
Re: GetObjectPos, SetPlayerCamerPos - by [MWR]Blood - 07.10.2011, 20:39
Re: GetObjectPos, SetPlayerCamerPos - by Zh3r0 - 07.10.2011, 20:41
Re: GetObjectPos, SetPlayerCamerPos - by DRIFT_HUNTER - 07.10.2011, 20:41
Re: GetObjectPos, SetPlayerCamerPos - by System64 - 07.10.2011, 21:01

Forum Jump:


Users browsing this thread: 1 Guest(s)