cameralookat
#1

hey guys i want to use /chanel 1 and watch in front of LSPD but when i use it it giving me another location
i took the coords with /save

Код HTML:
SetPlayerCameraPos(playerid, -671.0615,-1942.4513,34.4413);
	    	    SetPlayerCameraLookAt(playerid, -671.0615,-1942.4513,34.4413);
what is wrong ?
Reply
#2

Hello.

The coords in SetPlayerCameraLookAt must be different as they in SetPlayerCameraPos.
Go in this direction where the camera should look at and save a Position, then use this coords for SetPlayerCameraLookAt.
Reply
#3

it's just a small problem why if i use this cmd

Код HTML:
CMD:canal(playerid,params[])
{
    new canaltype[20];
	if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
	if(MinerCrashSistem[playerid] == 1)
    {
		if(sscanf(params,"s[20]", canaltype)) return SendClientMessage(playerid, COLOR_SYN, "Tasteaza:{FFFFFF} /canal <1 / 2 / off>");
		{
	        if(strmatch(canaltype,"off"))
		    {
				SetCameraBehindPlayer(playerid);
				TogglePlayerControllableEx(playerid, 1);
			}
			else if(strmatch(canaltype,"1"))
		    {
		        TogglePlayerControllableEx(playerid, 0);
			    SetPlayerCameraPos(playerid, -706.1038,-2114.8777,48.6867);
	    	    SetPlayerCameraLookAt(playerid, -670.1973,-2073.6287,28.7545);
			}
			else if(strmatch(canaltype,"2"))
		    {
		        TogglePlayerControllableEx(playerid, 0);
			    SetPlayerCameraPos(playerid, -671.0615,-1942.4513,34.4413);
	    	    SetPlayerCameraLookAt(playerid, -671.0615,-1942.4513,34.4413);
			}
		}
	}
	else SendClientMessage(playerid, COLOR_WHITE, "Mina nu este prabusita, nu poti folosi aceasta comanda.");
	return 1;
}
at spawn it give me this position with camera: http://imgur.com/a/pu4rN

but if i am in range of where did o took the coords it gives me right position: http://imgur.com/a/kOmoT

both of chanel 1 and 2 , but i did only good coords for canal 1

why?
Reply
#4

Look here:
PHP код:
SetPlayerCameraPos(playerid, -671.0615,-1942.4513,34.4413);
SetPlayerCameraLookAt(playerid, -671.0615,-1942.4513,34.4413); 
The coords are equal again.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)