SA-MP Forums Archive
Class camera help problem + rep - 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: Class camera help problem + rep (/showthread.php?tid=567279)



Class camera help problem + rep - Mijata - 12.03.2015

how to set request camera here



and here



and camera moving from place to place like flying

Code:
SetPlayerTeamFromClass(playerid,classid);
public OnPlayerRequestClass(playerid, classid)
{
            switch(classid)
            {
            case 0,1,2,3,4,5:
            {
                // TEAM STUFF
                GameTextForPlayer(playerid,"~b~Cops",1000,4);
                SetPlayerColor(playerid, C_COLOR);
                gTeam[playerid] = C1;
                SetPlayerPos(playerid,254.5903,1895.2537,20.3694);
                SetPlayerCameraPos(playerid,244.5754,1895.7119,19.8237);
                SetPlayerCameraLookAt(playerid,254.5903,1895.2537,20.3694);
                SetPlayerFacingAngle(playerid,90.6916);
                ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
                    }
               case 6,7,8,9,10,11:
                    {
                GameTextForPlayer(playerid,"~r~Terrorists",1000,4);
                SetPlayerColor(playerid, T_COLOR);
                gTeam[playerid] = T1;
                SetPlayerPos(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerCameraPos(playerid,-279.0844,2660.7461,62.6090);
                SetPlayerCameraLookAt(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerFacingAngle(playerid,271.5169);
                ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
            }
    }



Re: Class camera help problem + rep - Golf - 12.03.2015

with
InterpolateCameraPos
and
InterpolateCameraLookAt
ex
PHP Code:
#define time 3000 // = 3sec
public OnPlayerRequestClass(playeridclassid)
{
            switch(
classid)
            {
            case 
0,1,2,3,4,5:
            {
                
// TEAM STUFF
                
GameTextForPlayer(playerid,"~b~Cops",1000,4);
                
SetPlayerColor(playeridC_COLOR);
                
gTeam[playerid] = C1;
                
SetPlayerPos(playerid,254.5903,1895.2537,20.3694);
                
                
TogglePlayerSpectating(playerid1);
                
InterpolateCameraPos(playerid244.5754,1895.7119,19.82371000.01000.030.0timeCAMERA_MOVE);
                
InterpolateCameraLookAt(playerid254.5903,1895.2537,20.3694, -50.050.010.0timeCAMERA_MOVE);
                
                
SetPlayerFacingAngle(playerid,90.6916);
                
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
                    
}
               <
a href="http://cityadspix.com/tsclick-MIQCWPUV-GECAQBFF?url=http%3A%2F%2Fwww.sotmarket.ru%2Fproduct%2Fryukzak-case-logic-bpca-115-dlya-noutbuka-15-6.html&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=ODI1LTAtMTQyNjE4MTQxNy0xMzEyOTk3Nw%3D%3D&fid=NDQ1NzU2Nzc1&prdct=0a3e07340238013700&kw=case%206" target="_blank" alt="Case logic Berkeley Plus Backpack 15.6" title="Case logic Berkeley Plus Backpack 15.6" style="">case 6</a>,7,8,9,10,11:
                    {
                
GameTextForPlayer(playerid,"~r~Terrorists",1000,4);
                
SetPlayerColor(playeridT_COLOR);
                
gTeam[playerid] = T1;
                
SetPlayerPos(playerid,-285.0289,2661.6575,62.6531);
                
SetPlayerCameraPos(playerid,-279.0844,2660.7461,62.6090);
                
SetPlayerCameraLookAt(playerid,-285.0289,2661.6575,62.6531);
                
SetPlayerFacingAngle(playerid,271.5169);
                
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
            
}
    }
                
SetPlayerFacingAngle(playerid,90.6916);
                
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
                    
}
               case 
6,7,8,9,10,11:
                    {
                
GameTextForPlayer(playerid,"~r~Terrorists",1000,4);
                
SetPlayerColor(playeridT_COLOR);
                
gTeam[playerid] = T1;
                
TogglePlayerSpectating(playerid1);
                
InterpolateCameraPos(playerid,-279.0844,2660.7461,62.60901000.01000.030.0timeCAMERA_MOVE);
                
InterpolateCameraLookAt(playerid, -285.0289,2661.6575,62.6531, -50.050.010.0timeCAMERA_MOVE);
                
SetPlayerPos(playerid,-285.0289,2661.6575,62.6531);
                
SetPlayerFacingAngle(playerid,271.5169);
                
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
            
}
    }
    
OnPlayerSpawn ---------- > TogglePlayerSpectating(playerid0); 



Re: Class camera help problem + rep - Mijata - 12.03.2015

now can't complite