AttachCameraToObject
#1

I've been trying to make a smooth server entrance without the standard class selection, I decided to make an invisible object, and attach the camera to it.
pawn Код:
new JoinCamObj;
pawn Код:
public OnGameModeInit()
{
    JoinCamObj = CreateDynamicObject(19300, 2557.5522, 1496.1029, 23.7936, 0, 0, 0, 0, 0, 0, 200.0);
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
    SetJoinCamera(playerid);
    return 1;
}
pawn Код:
public SetJoinCamera(playerid)
{
    TogglePlayerSpectating(playerid, 1);
    AttachCameraToObject(playerid, JoinCamObj);
    return 1;
}
The code is being executed, because the player is being put into spectator mode, but the camera is not being attached to the invisible object.
Reply


Messages In This Thread
AttachCameraToObject - by ReneG - 02.05.2012, 01:54
Re: AttachCameraToObject - by MP2 - 02.05.2012, 02:05
Re: AttachCameraToObject - by ReneG - 02.05.2012, 02:20
Re: AttachCameraToObject - by MP2 - 02.05.2012, 02:29
Re: AttachCameraToObject - by ReneG - 02.05.2012, 02:38
AW: AttachCameraToObject - by Nanory - 02.05.2012, 11:36
Re: AttachCameraToObject - by MP2 - 02.05.2012, 12:24

Forum Jump:


Users browsing this thread: 1 Guest(s)