14.03.2012, 16:43
(
Последний раз редактировалось tony_fitto; 14.03.2012 в 19:31.
)
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?
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;
}