SA-MP Forums Archive
Camera help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Camera help (/showthread.php?tid=358063)



Camera help - P<3TS - 09.07.2012

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.


Re: Camera help - P<3TS - 09.07.2012

Or like a tutorial


Re: Camera help - RedJohn - 09.07.2012

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



Re: Camera help - P<3TS - 09.07.2012

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


Re: Camera help - RedJohn - 09.07.2012

If you need help just PM!