SetPlayerCameraPos help
#1

So.
On my server, when a player connects and the script checks him if he have an account, I want to set a position to player in an interior and apply an animation. This is what i've done but when I connect to the game to register on the server, i fall from the sky. I don't know what to do. This is the script when the player connects.
PHP код:
public OnPlayerConnect(playerid)
{
    if(
fexist(UserPath(playerid)))
    {                           
        
SetPlayerPos(playerid1479.8406,-1351.1758,121.4929);//
        
ApplyAnimation(playerid"PED""SEAT_idle"4.099910000);
        
TogglePlayerControllable(playerid0);
        
AnimPlay[playerid] = 1;
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        
GetPlayerIp(playeridipjucatorsizeof(ipjucator));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
format(stringsizeof(string), "{FFFFFF}Bine ai revenit pe Play Arena {7FFFD4}%s {FFFFFF}!\n{FFFFFF}IP: {7FFFD4}%s\n{FFFFFF}Acest nume este deja оnregistrat !\n{FFFFFF}Te rog scrie parola оn căsuta de mai jos pentru a putea intra оn joc:"sendernameipjucator);
        
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{FFFFFF}Conectare"string,"{FFFFFF}Conectare""{FFFFFF}Quit"); //login
    
}
    else
    {
        
SetPlayerPos(playerid1479.8406,-1351.1758,121.4929);//
        
ApplyAnimation(playerid"PED""SEAT_idle"4.099910000);
        
TogglePlayerControllable(playerid0);
        
ApplyAnimation(playerid"PED""SEAT_idle"4.099910000);
        
AnimPlay[playerid] = 1;
        
GetPlayerIp(playeridipjucatorsizeof(ipjucator));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
SetPlayerHealth(playerid100);
        
format(stringsizeof(string), "{FFFFFF}Bine ai venit pe Play Arena {7FFFD4}%s {FFFFFF}!.\n{FFFFFF}IP: {7FFFD4}%s\n{FFFFFF}Pentru a te putea inregistra,scrie o parolă оn căsuta de mai jos pentru a putea continua:"sendernameipjucator);
        
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Оnregistrare"string"{FFFFFF}Inregistrare","{FFFFFF}Quit");
    }
    return 
1;

Reply
#2

possibility you miss SetPlayerInterior(playerid, interiorid); don't you?
Reply
#3

No. I added the SetPlayerInterior after i post this and it doesn't work
Reply
#4

Quote:
Originally Posted by radiobizza
Посмотреть сообщение
No. I added the SetPlayerInterior after i post this and it doesn't work
well, you see interior objects or empty floor and player fall from it?
Reply
#5

after i put some dialogs, i type /tp2 and put me right where i want but when I connect to the server,i can't see the objects
Reply
#6

Quote:
Originally Posted by radiobizza
Посмотреть сообщение
after i put some dialogs, i type /tp2 and put me right where i want but when I connect to the server,i can't see the objects
then use SetPlayerInterior again above SetPlayerPos and it should work
Reply
#7

it still doesn't work...


in this pictures you can see what i don't want to appear
Reply
#8

You are using CreateObject or CreateDynamicObject?
CreateObject can be view every time and CreateDynamicObject will show after when you spawn.
Reply
#9

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
You are using CreateObject or CreateDynamicObject?
CreateObject can be view every time and CreateDynamicObject will show after when you spawn.
i have just 2 mapps. one for spawn and another one for registration dialog and log-in
On the first map i use CreateDynamicObject and at the spawn for registration I use SetObjectMaterialText like this
PHP код:
    tmpobjid CreateObject(19375,1475.996,-1354.330,120.407,0.000,90.000,0.000,300.000);
    
SetObjectMaterial(tmpobjid014832"lee_stripclub""Strip_wood_floor"0); 
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)