cameralookat - 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: cameralookat (
/showthread.php?tid=618500)
cameralookat -
StR_MaRy - 06.10.2016
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 ?
Re: cameralookat -
Mencent - 06.10.2016
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.
Re: cameralookat -
StR_MaRy - 06.10.2016
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?
Re: cameralookat -
Mencent - 06.10.2016
Look here:
PHP код:
SetPlayerCameraPos(playerid, -671.0615,-1942.4513,34.4413);
SetPlayerCameraLookAt(playerid, -671.0615,-1942.4513,34.4413);
The coords are equal again.