Move camera to certain locations(no code - yet...)
#1

Ok so for my server OnPlayerRequestClass I want the camera's blinking from place to player example, For 5 Seconds it's on 1 Place then it goes to another...
Anyways can someone give me some function call backs or whatever to do this, I will make it myself if no one will make it for me, I just need somewhere to start...
Reply
#2

Here you go hopefully this helps;

This will switch your camera location from place to place while the person is either logining in or registering.

Код:
new Testing[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)
{
    Testing[playerid] = 1;
    if(Testing[playerid] == 1)
    {
           TogglePlayerSpectating(playerid, 1);
           InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
           InterpolateCameraLookAt(playerid, 50.0, 50.0, 10.0, -50.0, 50.0, 10.0, 10000, CAMERA_MOVE);
	   SetTimerEx("NextStep1", 5000, false, "i", playerid);
    }
    else if(Testing[playerid] == !1) return 1;
    return 1;
}

forward NextStep1(playerid);
public NextStep1(playerid)
{
    InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 50.0, 50.0, 10.0, -50.0, 50.0, 10.0, 10000, CAMERA_MOVE);
	SetTimerEx("NextStep2", 5000, false, "i", playerid);
}

forward NextStep2(playerid);
public NextStep2(playerid)
{
    InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 50.0, 50.0, 10.0, -50.0, 50.0, 10.0, 10000, CAMERA_MOVE);
    Testing[playerid] = 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)