[Noob question] Camera view.
#1

Hey, im brand new to starting maps, and i've set it up so you can select 1 of 9 different characters. (all while looking at the electric walkway screen in LV) I want it to show the actual character on your screen, and let you hit the back and forth arrows. Every server does this. how do i?
Reply
#2

You mean when you choose your skin? on start?
Reply
#3

Yeah, when you start up and choose your skin.
Reply
#4

You would do that in public OnPlayerRequestClass just like below. You can get all the coordinates with /save then go to your SA main folder and open savedpositions.txt.

Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, x,y,z); // this is where the character will be standing
	SetPlayerFacingAngle(playerid, angle); // this is the angle the character will face
	SetPlayerCameraPos(playerid, x,y,z); // this is the position of the characters view
	SetPlayerCameraLookAt(playerid, x,y,z); // this is the direction in which the players camera is looking, you want to point it back at the characters position.
	return 1;
}
Here is an example one below for you too look at and use if you want to. If you need any more help or anything just PM me or something.

Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,2155.3032,-97.4670,2.7147);
	SetPlayerFacingAngle(playerid,64.9580);
	SetPlayerCameraPos(playerid, 2151.5503,-95.4320,2.7001);
	SetPlayerCameraLookAt(playerid,2057.6353,-100.8397,1.8606);
    return 1;
}
Reply
#5

s0rry for not replying fast, but he already gave you the answer, hes right.
Reply
#6

Thanks so much guys.
Reply
#7

Hey, i copied the code you so kindly made for me Quincy_Gatlin, and it half-works. It shows the camera facing a lake, with a dock.. But there isnt a character model standing there like i wanted. Sorry for being such a noob, but this is literally my first dip into PAWN code, and i have no idea about it.

As you can see above, i have added 12 player classes, and want each gang (Grove..Balla..Triad) To have their own camera selection screen. (Like in Novicane server). I added your code below, and it just shows a lake. How do i put one of the classes i've already added infront of the lake? After i get that part, i can re-adjust the location to somewhere other than a lake.


Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("fireinthesky");
	AddPlayerClass(105,1679.9406,-1351.8318,158.4766,49.5225,31,5000,29,5000,26,5000); // Grovest1
	AddPlayerClass(106,1679.9406,-1351.8318,158.4766,49.5225,27,5000,28,5000,24,5000); // Grovest2
	AddPlayerClass(107,1679.9406,-1351.8318,158.4766,49.5225,34,5000,39,5000,22,5000); // Grovest3
	AddPlayerClass(102,1417.3229,-1220.0721,195.0469,329.8417,31,5000,29,5000,26,5000); // Ballas1
	AddPlayerClass(103,1417.3229,-1220.0721,195.0469,329.8417,27,5000,28,5000,24,5000); // Ballas2
	AddPlayerClass(104,1417.3229,-1220.0721,195.0469,329.8417,34,5000,39,5000,22,5000); // Ballas3
	AddPlayerClass(108,1540.5577,-1071.8640,181.2031,132.7373,31,5000,29,5000,26,5000); // Vagos1
	AddPlayerClass(109,1540.5577,-1071.8640,181.2031,132.7373,27,5000,28,5000,24,5000); // Vagos2
	AddPlayerClass(110,1540.5577,-1071.8640,181.2031,132.7373,34,5000,39,5000,22,5000); // Vagos3
	AddPlayerClass(117,1763.7706,-1201.6462,91.6406,91.1531,31,5000,29,5000,26,5000); // Triad1
	AddPlayerClass(118,1763.7706,-1201.6462,91.6406,91.1531,27,5000,28,5000,24,5000); // Triad2
	AddPlayerClass(120,1763.7706,-1201.6462,91.6406,91.1531,34,5000,39,5000,22,5000); // Triad3
	AddStaticVehicle(448,1660.5554,-1352.5548,159.2643,0.0000,1,9); //
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,2155.3032,-97.4670,2.7147);
	SetPlayerFacingAngle(playerid,64.9580);
	SetPlayerCameraPos(playerid, 2151.5503,-95.4320,2.7001);
	SetPlayerCameraLookAt(playerid,2057.6353,-100.8397,1.8606);
	return 1;
}
Reply
#8

You mean like when they get to grove class the class shows them on grove st and if its aztecas it shows on their territory?
Reply
#9

Rightttt. Exactly what i mean How do i do it?
Reply
#10

that's done with gTeam, look it up on the wiki, (wiki.sa-mp.com) using it, you can set up teams for each gang, when they get to that gang, you can set the team up to have their own camera position and such
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)