[Include] [INC] Game of Thrones intro for SA:MP
#1

What is this?

If you're a fan of a Game of Thrones series (based on A Song of Ice and Fire books by George R. R. Martin), then you know what this might be, but if you're not a fan of it, then watch the video (link is below).



Video:

Click here for the official Game Of Thrones show intro.

Example in SA-MP:

(Click on the image for the video)

Some old works which are based on the same include:
https://*****.com/48819234 (castles)
https://*****.com/66466911 (temple island)
https://*****.com/48567699 (include testing #1)
https://*****.com/48607504 (include testing #2)



Credits:

- Incognito for streamer plugin,
- Y_Less for foreach/iterator include.



How to use?

It's easy and simple - download and put the gtint.inc into the \pawno\include\ folder. Do the same thing with the foreach.inc and streamer.inc files. Put your streamer plugin (dll/so) into the \plugins\ folder.

Open your script and put this:
pawn Code:
#include <foreach>
#include <streamer>
#include <gtint>
right after the
pawn Code:
#include <a_samp>


Functions and callbacks:

Code:
// Functions.
CreateGTCamera(gtintroid, Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2, time_move, time_wait);
IsGTIntroCreated(gtintroid);
SetCameraMoveTime(gtintroid, gtcamid, time);
GetCameraMoveTime(gtintroid, gtcamid);
SetCameraWaitTime(gtintroid, gtcamid, time);
GetCameraWaitTime(gtintroid, gtcamid);
GetCameraObjectCount(gtintroid, gtcamid);
CreateGTObject(gtintroid, gtcamid, modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:x2, Float:y2, Float:z2, Float:rx2, Float:ry2, Float:rz2, Float:speed);
SetGTObjectMaterial(gtobjid, m_index, modelid, txdname[], texturename[]);
SetPlayerGTIntro(playerid, gtintroid, url[] = "");
EndPlayerGTIntro(playerid);
GetPlayerIntroID(playerid);
GetPlayerCameraID(playerid);
Code:
// Callbacks.
OnGTIntroCameraMove(playerid, gtintroid, gtcamid);

Examples:

Code:
// Examples.
#define INTRO_TEST_1 (0)

new
		gCamera;

public OnGameModeInit()
{
	/*
	* First camera will move towards second camera with the 2 seconds moving time
	* and the first camera will wait 5 seconds before going to the second camera.
	*
	* Since there is no camera after the second camera, that means that second
	* camera is the last camera, the ending camera.
	*
	* Three objects with model 18809 will be created.
	*
	* First object (for an example) will move from position -50.0, -50.0, 500.0 to position -60.0, -60.0, 510.0,
	* and the object will rotate from rotation 0.0, 0.0, 1.0 to rotation 0.0, 0.0, 360.0.
	* All that will happen with the speed of 5.0.
	*/

	gCamera = CreateGTCamera(INTRO_TEST_1, 81.94, 112.38, 611.69, 78.97, 108.36, 610.47, 2, 5);

	CreateGTObject(INTRO_TEST_1, gCamera, 18809, -50.0, -50.0, 500.0, 0.0, 0.0, 1.0, -60.0, -60.0, 510.0, 0.0, 0.0, 360.0, 5.0);
	CreateGTObject(INTRO_TEST_1, gCamera, 18809, -60.0, -60.0, 510.0, 0.0, 0.0, 1.0, -70.0, -70.0, 520.0, 0.0, 0.0, 360.0, 5.0);
	CreateGTObject(INTRO_TEST_1, gCamera, 18809, -70.0, -70.0, 520.0, 0.0, 0.0, 1.0, -50.0, -50.0, 500.0, 0.0, 0.0, 360.0, 5.0);

	CreateGTCamera(INTRO_TEST_1, -37.68, 125.22, 561.97, -35.71, 120.71, 562.87, 0, 0);

	/*****/

	if(IsGTIntroCreated(INTRO_TEST_1))
	{
		// Do something.
	}

	/*****/

	SetCameraMoveTime(INTRO_TEST_1, gCamera, 5);
	printf("Moving time: %i", GetCameraMoveTime(INTRO_TEST_1, gCamera));

	SetCameraWaitTime(INTRO_TEST_1, gCamera, 10);
	printf("Waiting time: %i", GetCameraWaitTime(INTRO_TEST_1, gCamera));

	/*****/

	new
			gt_object = CreateGTObject(INTRO_TEST_1, gCamera, 18809, -50.0, -50.0, 500.0, 0.0, 0.0, 1.0, -60.0, -60.0, 510.0, 0.0, 0.0, 360.0, 5.0);
	SetGTObjectMaterial(gt_object, 0, 8839, "vgsecarshow", "lightblue2_32");
	SetGTObjectMaterial(gt_object, 1, 8839, "vgsecarshow", "lightgreen2_32");
	SetGTObjectMaterial(gt_object, 2, 8839, "vgsecarshow", "lightyellow2_32");
	return true;
}

public OnGTIntroCameraMove(playerid, gtintroid, gtcamid)
{
	if(gtintroid == INTRO_TEST_1)
	{
		if(gtcamid == gCamera)
		{
			// Do something.
		}
	}
	return true;
}

Definitions:

pawn Code:
#define MAX_GT_INTROS (2)
#define MAX_GT_CAMERAS (5) // Per intro.
#define MAX_OBJECTS_PER_CAMERA (300) // Per camera.
#define MAX_GT_TEXTURES (3) // Per object.


Other:

You can collect the camera coordinates by using this script.



Download:

Reply


Messages In This Thread
[INC] Game of Thrones intro for SA:MP - by Correlli - 31.08.2012, 01:56
Re: [INC] Game of Thrones intro for SA:MP - by iWhite - 31.08.2012, 08:08
Re: [INC] Game of Thrones intro for SA:MP - by Correlli - 31.08.2012, 17:05
AW: [INC] Game of Thrones intro for SA:MP - by rocky2103 - 01.09.2012, 08:00
Re: [INC] Game of Thrones intro for SA:MP - by MP2 - 01.09.2012, 09:38
Re: [INC] Game of Thrones intro for SA:MP - by Яlackon - 06.09.2012, 19:45
Re: [INC] Game of Thrones intro for SA:MP - by Correlli - 11.06.2016, 19:56
Re: [INC] Game of Thrones intro for SA:MP - by Ivan_Ino - 11.06.2016, 21:19

Forum Jump:


Users browsing this thread: 1 Guest(s)