SA-MP Forums Archive
[SOLVED] Diffrent camera areas for diffrent teams on OnPlayerRequestClass - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Diffrent camera areas for diffrent teams on OnPlayerRequestClass (/showthread.php?tid=91317)



[SOLVED] Diffrent camera areas for diffrent teams on OnPlayerRequestClass - _Vortex - 14.08.2009

How do I make the Camera look in a diffrent area for each team

Here's an example, lets say someone scrolls to the triad team on OnPlayerRequestClass

It shows that area for that team..

Now lets say someone goes to the Cops team on OnPlayerRequestClass:


I know, I have to do:

SetPlayerPos(playerid,x,y,z);
SetPlayerCameraPos(playerid,x,y,z);
SetPlayerCameraLookAt(playerid,x,y,z);

for each team, but I don't know how to make it show as they scroll through the teams.. xD

Thanks


Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - Yuryfury - 14.08.2009

under OnPlayerRequestClass:

pawn Код:
switch(classid)
{
   case 0:
   {
     //firstskin
   }
   case 1:
   {
     //secondskin
   }
}



Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - _Vortex - 14.08.2009

Thanks dude, I knew it had to be done with cases, but I was doing it with ifs and else ifs xD Thanks for reminding me


Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - nuriel8833 - 14.08.2009

but if you want to do a team so use gTeam


Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - _Vortex - 14.08.2009

Quote:
Originally Posted by nuriel8833
but if you want to do a team so use gTeam
case works better, and its easier.


Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - nuriel8833 - 14.08.2009

Quote:
Originally Posted by Zer0[x
]
Quote:
Originally Posted by nuriel8833
but if you want to do a team so use gTeam
case works better, and its easier.
but it is doing for only 1 skin.if he have like 5 groups of 5,he wont do 25 cases ><


Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - _Vortex - 14.08.2009

Quote:
Originally Posted by nuriel8833
Quote:
Originally Posted by Zer0[x
]
Quote:
Originally Posted by nuriel8833
but if you want to do a team so use gTeam
case works better, and its easier.
but it is doing for only 1 skin.if he have like 5 groups of 5,he wont do 25 cases ><
Works just fine on my server, test it out (in sig)



Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - Rusty1337 - 14.08.2009

use an array..

new Float:cams[][7] = {
{x,y,z,x,y,z,angle},
{x,y,z,x,y,z,angle},
{x,y,z,x,y,z,angle}
};

thats x y z for camera pos and x y z angle for where the person is at

each line is a skin

OnPlayerRequestClass:

SetCameraPos(playerid, cams[classid][0],cams[classid][1],cams[classid][2]);
SetCamerLookAt(playerid, cams[classid][3],cams[classid][4],cams[classid][5]);
SetPlayerPos(playerid, cams[classid][3],cams[classid][4],cams[classid][5]);
SetPlayerFacingAngle(playerid, cams[classid][6]);

should work untested


Re: Diffrent camera areas for diffrent teams on OnPlayerRequestClass - _Vortex - 14.08.2009

Its solved already, sorry :P


Re: [SOLVED] Diffrent camera areas for diffrent teams on OnPlayerRequestClass - Rusty1337 - 14.08.2009

i know thats just easier than having 700 lines of code where you can have 200