SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 29/09/2018, 04:07 AM   #1
axellech
Huge Clucker
 
Join Date: Mar 2016
Posts: 213
Reputation: 0
Default SetPlayerCameraPos

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;

axellech is offline   Reply With Quote
Old 29/09/2018, 11:37 AM   #2
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 435
Reputation: 31
Default Re: [help-me] SetPlayerCameraPos

Check
https://wiki.sa-mp.com/wiki/InterpolateCameraPos
to move camera position coordinates, and
https://wiki.sa-mp.com/wiki/InterpolateCameraLookAt
to move camera look at coordinates.
v1k1nG is offline   Reply With Quote
Old 29/09/2018, 01:05 PM   #3
NikhilMeena
Banned
 
Join Date: Sep 2018
Location: India
Posts: 6
Reputation: 7
Default Re: [help-me] SetPlayerCameraPos

Use wiki-samp there you can find how to make player camera pos
NikhilMeena is offline   Reply With Quote
Old 29/09/2018, 01:54 PM   #4
BanSilog
Big Clucker
 
BanSilog's Avatar
 
Join Date: Nov 2017
Location: Philippines
Posts: 94
Reputation: 16
Default Re: [help-me] SetPlayerCameraPos

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..
__________________
BanSilog is offline   Reply With Quote
Old 30/09/2018, 12:54 AM   #5
axellech
Huge Clucker
 
Join Date: Mar 2016
Posts: 213
Reputation: 0
Default Re: [help-me] SetPlayerCameraPos

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://wiki.sa-mp.com/wiki/InterpolateCameraPos
to move camera position coordinates, and
https://wiki.sa-mp.com/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.
axellech is offline   Reply With Quote
Old 30/09/2018, 03:19 AM   #6
Undef1ned
Huge Clucker
 
Undef1ned's Avatar
 
Join Date: Aug 2018
Posts: 211
Reputation: 18
Default Re: [help-me] SetPlayerCameraPos

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?
Undef1ned is offline   Reply With Quote
Old 30/09/2018, 04:36 AM   #7
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,652
Reputation: 559
Default Re: [help-me] SetPlayerCameraPos

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.
NaS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SetPlayerCameraPos help radiobizza Scripting Help 14 13/01/2016 07:50 PM
SetPlayerCameraPos Roel Scripting Help 1 04/09/2014 04:13 PM
Help with SetPlayerCameraPos. TaLhA XIV Scripting Help 5 16/08/2012 06:39 PM
SetPlayerCameraPos PizNiz Help Archive 7 29/05/2011 11:08 AM
[Help] SetPlayerCameraPos farmer1710 Help Archive 7 19/05/2011 10:33 PM


All times are GMT. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.