29.12.2014, 12:10
Код:
public OnPlayerRequestClass( playerid, classid ) { for ( new i = 0; i < 12; i++ ) PlayerTextDrawHide( playerid, ConnectTD[ i ] ); for ( new i = 0; i < 6; i++ ) TextDrawShowForPlayer( playerid, ServerPanel[ i ] ); Announce( playerid, "~r~~h~S~w~~h~elect ~y~~h~S~w~~h~kin", 1000, 1 ); Streamer_UpdateEx( playerid, 381.7331, -1819.4648, 14.7004 ); SetPlayerFacingAngle( playerid, 320.3514 ); SetPlayerSpecialAction( playerid, 5 ); SetPlayerPos(playerid, player_x,player_y,player_z); SetPlayerFacingAngle(playerid, player_angle); SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z); SetPlayerCameraLookAt(playerid, player_x,player_y,player_z); ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing. It's most fitting to the music PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238); //music, duh //making sure the timer gets executed only once, so the camera doesn't go to fast if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid); PlayerInfo[playerid][SpawnDance] = false; //preventing the timer to execute again SetSpawnInfo( playerid, 0, 0, 1743.3751,-1862.2699,13.5765,8.0361, 269.15, 26, 36, 28, 150, 0, 0 ); return ( 1 ); }
and in OnPlayerRequestSpawn:
Код:
public OnPlayerRequestSpawn( playerid ) { DestroyBeachSpawn( playerid ); StopAudioStreamForPlayer( playerid ); CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/audiomsgoff" ); return ( 1 ); }