[Bug] InterpolateCameraPos & InterpolateCameraLookAt Under OnPlayerRequestClass. -
tony_fitto - 14.03.2012
Hey guys,
I have an issue with InterpolateCameraPos & InterpolateCameraLookAt.
As you can see in this code where I use them I get like cordinates 0.0000 on all cordinates some how.
Any ideas how to fix this or it's a bug on samp?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
return 1;
}
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
TextDrawShowForPlayer(playerid, RegisterPart1[playerid]);
TextDrawShowForPlayer(playerid, RegisterPart2[playerid]);
new Query[128], EscapedName[MAX_PLAYER_NAME], JaName[MAX_PLAYER_NAME];
new loginstring[128];
GetPlayerName(playerid, JaName, sizeof(JaName));
mysql_real_escape_string(JaName, EscapedName);
#pragma unused Name
format(Query, sizeof(Query), "SELECT `UserID` FROM `accounts` WHERE `pName` = '%s'", EscapedName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() >= 1)
{
if(mysql_num_rows() >= 2)
{
mysql_free_result();
SendClientMessage(playerid, -1, "There seems to be duplicates of your account, please contact a high-level admin.");
Kick(playerid);
}
else
{
DatabaseID[playerid] = mysql_fetch_int();
mysql_free_result();
format(loginstring,sizeof(loginstring),"Welcome to Southland Role play. \n \nThat name is registered.\nPlease enter your password below:");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Login.",loginstring,"Login","Exit");
}
}
else
{
mysql_free_result();
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Welcome to Southland Role play.","Please register your account by typing your email below:","Register","Exit");
}
SetPlayerTeamFromClass(playerid,classid);
SetPlayerPos(playerid,580.7487,-2531.0840,27.8510);
SetPlayerCameraPos(playerid, 580.7487,-2529.0840,27.8510);
SetPlayerCameraLookAt(playerid, 580.7487,-1761.3137,27.8510);
InterpolateCameraPos(playerid, 580.7487, -1767.6124, 27.8510, 580.7487, -1761.3137, 27.8510, 3, 2);
InterpolateCameraLookAt(playerid, 580.7487, -1761.3137, 27.8510, 580.7487, -1761.3137, 27.8510, 3, 2);
SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0);
}
else
{
SpawnPlayer(playerid);
}
return false;
}
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
MP2 - 14.03.2012
You don't need to use SpawnPlayer on NPCs, they automatically spawn. Just return 1.
As for your problem, what is the problem? What happens?
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
tony_fitto - 14.03.2012
Hard to explain but this is what happens.
I took this image to show you what happens, as far as I know theres no issue with the login or something I Just added the camera movment to make it more nice when you login, but insted of the camera moves it stuck at some creapy cordinates which I never used.
AW: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
Drebin - 14.03.2012
Yes I have the same problem. Using InterpolateCameraPos(); in OnPlayerRequestClass puts my camera to 0.0 0.0 0.0 and facing angle 0. Either this is a problem in my code, which I doubt, or it's a SA-MP issue.
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
tony_fitto - 14.03.2012
I guess it's a 0.3e bug, anyone knows where I can report bugs as well to see if anyone have reported it and if not I will report it.
AW: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
Drebin - 14.03.2012
You're in the right section already
This topic is already a report actually.
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
tony_fitto - 14.03.2012
Oh Nice
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
IstuntmanI - 16.03.2012
When you are at request class, GetPlayerPos returns 0.0, 0.0, 0.0, and I think that InterpolateCameraPos/LookAt works with GetPlayerPos.
Should be fixed.
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
tony_fitto - 16.03.2012
Quote:
Originally Posted by costel_nistor96
When you are at request class, GetPlayerPos returns 0.0, 0.0, 0.0, and I think that InterpolateCameraPos/LookAt works with GetPlayerPos.
Should be fixed.
|
Yeah thats true.
Re: [Help/Question] InterpolateCameraPos & InterpolateCameraLookAt. -
tony_fitto - 17.03.2012
Sorry if I'm bumping but I got an update.
I don't belive it's a bug cause if you view this guy he made it to work under OnePlayerRequestClass().
[ame="http://www.youtube.com/watch?v=oa7skJOnD34"]http://www.youtube.com/watch?v=oa7skJOnD34[/ame]