29.12.2011, 12:39
Код:
ShowXomnia( playerid ) { PlayerInfo[ playerid ][ xTutStep ] = 0; UpdatePlayer( playerid ); TextDrawSetString( IntroTxt[ playerid ][ 5 ], TutorialTitles[ PlayerInfo[ playerid ][ xTutStep ] ] ); TextDrawSetString( IntroTxt[ playerid ][ 6 ], TutorialStrings[ PlayerInfo[ playerid ][ xTutStep ] ] ); for( new i = 0; i < 7; i++ ) { TextDrawShowForPlayer( playerid, IntroTxt[ playerid ][ i ] ); } SetPlayerPos( playerid, ServerInfo[ MainSpawnX ], ServerInfo[ MainSpawnY ], ServerInfo[ MainSpawnZ ] ); SetPlayerFacingAngle( playerid, ServerInfo[ MainSpawnA ] ); SetPlayerInterior( playerid, ServerInfo[ MainSpawnInterior ] ); SetPlayerVirtualWorld( playerid, ServerInfo[ MainSpawnVirtualWorld ] ); SetPlayerCameraPos( playerid, ServerInfo[ MainSpawnX ] - TUTORIAL_CAMERA_OFFSET_X, ServerInfo[ MainSpawnY ] - TUTORIAL_CAMERA_OFFSET_Y, ServerInfo[ MainSpawnZ ] + TUTORIAL_CAMERA_OFFSET_Z ); SetPlayerCameraLookAt( playerid, ServerInfo[ MainSpawnX ], ServerInfo[ MainSpawnY ], ServerInfo[ MainSpawnZ ] ); TogglePlayerControllable( playerid, 0 ); Timer_xMoving[ playerid ] = SetTimerEx( "MovingCamera", MOVING_CAMERA_FPS, true, "i", playerid ); return true; }
Код:
function FirstTutorial( playerid ) { if( PlayerInfo[ playerid ][ xTutStep ] < 6 ) { TogglePlayerControllable( playerid, 0 ); PlayerInfo[ playerid ][ xTutStep ]++; OnPlayerUpdateEx( playerid ); TextDrawSetString( IntroTxt[ playerid ][ 5 ], TutorialTitles[ PlayerInfo[ playerid ][ xTutStep ] ] ); TextDrawSetString( IntroTxt[ playerid ][ 6 ], TutorialStrings[ PlayerInfo[ playerid ][ xTutStep ] ] ); return true; } else { for( new i = 0; i < 7; i++ ) TextDrawHideForPlayer( playerid, IntroTxt[ playerid ][ i ] ); PlayerInfo[ playerid ][ xTutStep ] = 255; UpdatePlayer( playerid ); KillTimer( Timer_xMoving[ playerid ] ); SetSpawnForPlayer( playerid ); SetCameraBehindPlayer( playerid ); } return true; }