SetPlayerCameraPos
#1

I'm trying to put the camera position somewhere more always going to that same place.
How can I solve this?






PHP Code:
forward OnLogin(playerid);
public 
OnLogin(playerid)
{
    new 
rowsfields;
    
cache_get_data(rowsfields);
    if(
rows)
    {
        
mysql_format(g_Readquerysizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%s' LIMIT 1"GetName(playerid));
        
mysql_tquery(g_Readquery"LoadAccount""i"playerid);
        
         
SendClientMessage(playeridCOLOR_TESTT"Debes elegir un equipo para jugar.");
         
IsConnected[playerid] = 1;
         
        new 
string[MAX_STRING_MSG], plrIP[16], country[25];
        
GetPlayerIp(playeridplrIPsizeof(plrIP));
        
GetPlayerCountry(playeridcountrysizeof(country));
        
        for(new 
i=0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i) && IsConnected[i] == && PlayerInfo[i][pAdmin] >= 2)
            {
                
format(stringsizeof(string), "%s se uniу al servidor. {FA5858}[IP : %s | Pais : %s]"GetName(playerid), plrIPcountry);
                
SendClientMessageToAdmins(string);
            }
        }
        
        
Log_Write("logs/connexion.txt""[%s] %s se conectу al servidor. [IP : %s]"ReturnDate(), GetName(playerid), plrIP);
        
        
        
SetPlayerCameraPos(playerid1269.0106,-1220.9059,52.3422);
        
SetPlayerCameraLookAt(playerid1210.0986,-1312.1886,52.3422);
        
        
        
        
SetTimerEx("textdrawinit"1000true"i"playerid); // On initialise les textdraws
        
return 1;
    }
    else
    {
        
Dialog_Show(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Conexiуn"""C_RED"Usted ha ingresado una contraseсa invбlida.\n"COL_WHITE"Por favor ingrese su contraseсa para iniciar sesiуn.""Login""Salir");
        return 
1;
    }
    
//return 1;

Reply
#2

Check
https://sampwiki.blast.hk/wiki/InterpolateCameraPos
to move camera position coordinates, and
https://sampwiki.blast.hk/wiki/InterpolateCameraLookAt
to move camera look at coordinates.
Reply
#3

Use wiki-samp there you can find how to make player camera pos
Reply
#4

Quote:
Originally Posted by NikhilMeena
View Post
Use wiki-samp there you can find how to make player camera pos
yes you are right but Newbie didn't know about that Try to help then Tell to use wiki samp next time..
Reply
#5

Quote:
Originally Posted by BanSilog
View Post
yes you are right but Newbie didn't know about that Try to help then Tell to use wiki samp next time..
@Haha you're funny, what are you? a clown?

Quote:
Originally Posted by v1k1nG
View Post
Check
https://sampwiki.blast.hk/wiki/InterpolateCameraPos
to move camera position coordinates, and
https://sampwiki.blast.hk/wiki/InterpolateCameraLookAt
to move camera look at coordinates.
I know this and I know how to do it, I'm asking for help because even if I put the position correctly, the camera is set to that position, and that I can not solve.
Reply
#6

Quote:
Originally Posted by BanSilog
View Post
yes you are right but Newbie didn't know about that Try to help then Tell to use wiki samp next time..
I imagine you're too professional, you're even a developer, right?
Reply
#7

Quote:
Originally Posted by axellech
View Post
@Haha you're funny, what are you? a clown?



I know this and I know how to do it, I'm asking for help because even if I put the position correctly, the camera is set to that position, and that I can not solve.
Use SetPlayerCameraLookAt before -Pos.

Also, if you use this shortly after TogglePlayerSpectating you need to add a small delay before setting the camera.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)