SA-MP Forums Archive
air recon online!!! - 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: air recon online!!! (/showthread.php?tid=595037)



air recon online!!! - GeneralAref - 27.11.2015

first see this:

Код:
forward endar(playerid);
CMD:ar(playerid, params[])
{
	new Float:x, Float:y, Float:z;
    	GetPlayerCameraPos(playerid, x, y, z);
     	InterpolateCameraPos(playerid, x, y, z, x, y, z+27.9843, 4000, CAMERA_MOVE);
    	SetTimer("endar", 20000, false);
        return 1;
}
public endar(playerid)
{
    SetCameraBehindPlayer(playerid);
    SendClientMessage(playerid,COLOR_BLUE,"Our fuel is ended.we are back to HQ!");
    return 1;
}
i see this picture in use:

i want this and rotates very slowly around it.The same call of duty



Re: air recon online!!! - TwinkiDaBoss - 27.11.2015

Look at this, it might help you. If I understood correctly, you want of camera to move/rotate
http://forum.sa-mp.com/showthread.ph...lass+selection


Re: air recon online!!! - GeneralAref - 28.11.2015

It's not my problem.That for team selection.
plz fix my code.


Re: air recon online!!! - Vince - 28.11.2015

Classic SetTimer/SetTimerEx problem. If you need to pass parameters always use SetTimerEx.


Re: air recon online!!! - GeneralAref - 28.11.2015

Look at the picture.
When I am using this code i see picture 1.but i need picture 2 understand?
Really was not anyone answer me?


Re: air recon online!!! - GeneralAref - 28.11.2015

i need freez and crouch with this command if player type /ar set camera pos on picture 2 and player freez and crouch.


Re: air recon online!!! - GeneralAref - 28.11.2015

i found it. thanks for your help
Код:
CMD:ar(playerid, params[])
{
        TogglePlayerControllable(playerid, 0);
  	new Float:v, Float:c, Float:r;
   	GetPlayerPos(playerid, v, c, r);
     	SetPlayerCameraPos(playerid, v, c, r+27.9843);
    	SetPlayerCameraLookAt(playerid, v, c, r);
    	SetTimer("endar", 20000, false);
        return 1;
}