Is it possible to "PlayerSpectatePlayer" when you're on the logging screen
#1

Hi, I wanted to know if it was possible to spectate another player(NPC in this case) when you're on the logging screen, when you connect. Aka - making the Toggle&PlayerSpectate... under the "public OnPlayerConnect" ?

Thanks
Reply
#2

why don't you check it out?
i think it's possible.
Reply
#3

it's not possible at "OnPlayerConnect" when you are showing the Login Dialog.. however it would be possible at "OnPlayerRequestClass" if I'm right..
Reply
#4

Quote:
Originally Posted by Sascha
Посмотреть сообщение
it's not possible at "OnPlayerConnect" when you are showing the Login Dialog.. however it would be possible at "OnPlayerRequestClass" if I'm right..
who said he is using a login dialog? and still, i don't think it should avoid him to do it.
and the class selections buttons using the same method of dialog.
Reply
#5

it's not because of the dialog..
it's because of the function itself..
"OnPlayerConnect" is called at the time when you have that "Beach view" at LS...
OnPlayerRequestClass is called just after that action... if he calls his Login Dialog (if he has one) at "OnPlayerRequestClass" he would have exact the feature that he wants to have...
Reply
#6

Quote:
Originally Posted by xDeadlyBoy
Посмотреть сообщение
why don't you check it out?
i think it's possible.
I tried, maybe I did an error, so I was just making sure.

Quote:
Originally Posted by Sascha
Посмотреть сообщение
it's not possible at "OnPlayerConnect" when you are showing the Login Dialog.. however it would be possible at "OnPlayerRequestClass" if I'm right..
I can't get it to work... er...

pawn Код:
public OnPlayerRequestSpawn( playerid )
{
    SetTimerEx("LoadFav", 11000, false , "i" , playerid );
    TogglePlayerSpectating(playerid, 1);
    PlayerSpectatePlayer(playerid, 0);
    SetTimer("aftercamera", 10000, 1);
    SendClientMessage(playerid, -1, "LOADING");
    return 1;
}
forward aftercamera(playerid);
public aftercamera(playerid)
{
    TogglePlayerSpectating(playerid, 0);
}
public OnPlayerSpawn( playerid )
{
    SetPlayerPos(playerid, 2181.9321,1682.9525,11.0676);
    SetPlayerFacingAngle(playerid, 91.38);
    SetCameraBehindPlayer(playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)