SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 31/08/2012, 01:56 AM   #1
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default [INC] Game of Thrones intro for SA:MP

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://vimeo.com/48819234 (castles)
https://vimeo.com/66466911 (temple island)
https://vimeo.com/48567699 (include testing #1)
https://vimeo.com/48607504 (include testing #2)



Credits:

- Incognito for streamer plugin,
- ****** 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:


Last edited by Correlli; 11/06/2016 at 07:48 PM.
Correlli is offline   Reply With Quote
Old 31/08/2012, 08:08 AM   #2
iWhite
Big Clucker
 
Join Date: May 2012
Posts: 176
Reputation: 18
Default Re: [INC] Game of Thrones intro for SA:MP



Nice job
iWhite is offline   Reply With Quote
Old 31/08/2012, 05:05 PM   #3
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: [INC] Game of Thrones intro for SA:MP

This include file is updated:
Z-offset is no longer supported. First x, y and z coordinates along with rx, ry and rz rotation in CreateGTObject function are the starting coordinates and rotation for the object, the second x, y and z coordinates along with rx, ry and rz rotation are the finishing coordinates and rotation for the object.

Video: https://vimeo.com/48607504
Download link: http://www.solidfiles.com/d/0be311dd61
Correlli is offline   Reply With Quote
Old 01/09/2012, 08:00 AM   #4
rocky2103
Little Clucker
 
rocky2103's Avatar
 
Join Date: Mar 2012
Posts: 10
Reputation: 51
Default AW: [INC] Game of Thrones intro for SA:MP

done
rocky2103 is offline   Reply With Quote
Old 01/09/2012, 09:38 AM   #5
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,235
Reputation: 1004
Default Re: [INC] Game of Thrones intro for SA:MP

Interesting.
__________________
Owner and developer of Mike's Cops and Robbers.

Click here to visit our site and find out more. Click here to view trailers.
Enter referral code SAMPFORUM after registering for a $5000 starting bonus!
MP2 is offline   Reply With Quote
Old 06/09/2012, 07:45 PM   #6
▀lackon
Little Clucker
 
Join Date: Jul 2012
Posts: 5
Reputation: 0
Default Re: [INC] Game of Thrones intro for SA:MP

good job
▀lackon is offline   Reply With Quote
Old 11/06/2016, 07:56 PM   #7
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: [INC] Game of Thrones intro for SA:MP

Include is updated.

- PVars are turned to PAWN variables,
- PlayerObjects are turned to DynamicObjects,
- support for textures is now available.

All objects and their properties are stored in variables in this version. That could result in big .amx file if you decide you want to have a lot of objects and textures. Storing all that may not be needed always, but I still wanted to updated this old include and add everything I did. But I'll still release a new version soon, without ability to store objects and their properties. Creation of those can easily be handled in the "OnGTIntroCameraMove" callback.
Correlli is offline   Reply With Quote
Old 11/06/2016, 09:19 PM   #8
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 101
Reputation: 120
Default Re: [INC] Game of Thrones intro for SA:MP

Fino fino, rep
Ivan_Ino is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Game of Thrones mevi Everything and Nothing 8 02/04/2012 10:53 PM
[HELP]For Intro luis_mendoza Scripting Help 11 26/11/2011 05:54 PM


All times are GMT. The time now is 07:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.