Camera help
#1

Hello there.
If a player type a stunt command then the camera position should change randomly
for example i type /stunt1
then the camera position should change randomly as a turorial
camera 1/5
camera 2/5
camera 3/5
camera 4/5
camera 5/5

At last the player should spawn in the stunt.
Please help me anyone.
Reply
#2

Or like a tutorial
Reply
#3

Try this, compiled without error, didn't tested! BUT DON'T REMEMBER TO CHANGE COORDINATES TO YOUR! If you don't know how to add coordinates just PM me!

pawn Код:
forward camera1();
public camera1()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera2", 5000, false); // Will run camera2
}
forward camera2();
public camera2()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera3", 5000, false); // Will run camera3
}
forward camera3();
public camera3()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera4", 5000, false); // Will run camera4
}
forward camera4();
public camera4()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera5", 5000, false); // Will run camera5
}
forward camera5();
public camera5()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetPlayerPos(playerid,x, y, z); // Will spawn player
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/stunt1", cmdtext, true, 10) == 0)
    {
        SetTimer("camera1", 5000, false); // camera1 = next camera, 5000 = 5 seconds, false = will no loop this command
        return 1;
    }
    return 0;
}
Reply
#4

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
Try this, compiled without error, didn't tested! BUT DON'T REMEMBER TO CHANGE COORDINATES TO YOUR! If you don't know how to add coordinates just PM me!

pawn Код:
forward camera1();
public camera1()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera2", 5000, false); // Will run camera2
}
forward camera2();
public camera2()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera3", 5000, false); // Will run camera3
}
forward camera3();
public camera3()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera4", 5000, false); // Will run camera4
}
forward camera4();
public camera4()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetTimer("camera5", 5000, false); // Will run camera5
}
forward camera5();
public camera5()
{
    SetPlayerCameraPos(playerid, x, y, z); // This is camera position
    SetPlayerCameraLookAt(playerid, x, y, z); // What camera will look at
    SetPlayerPos(playerid,x, y, z); // Will spawn player
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/stunt1", cmdtext, true, 10) == 0)
    {
        SetTimer("camera1", 5000, false); // camera1 = next camera, 5000 = 5 seconds, false = will no loop this command
        return 1;
    }
    return 0;
}
Thank you very much dude +rep
Reply
#5

If you need help just PM!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)