28.05.2015, 08:11
Код:
stock NormalTele( playerid, TeleName[ ], CMDName[ ], Float: VX, Float: VY, Float: VZ, Float: VA, Float: X, Float: Y, Float: Z, Float: A, interior ) { PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 ); if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) { SetVehiclePos( GetPlayerVehicleID( playerid ), VX, VY, VZ ); SetVehicleZAngle( GetPlayerVehicleID( playerid ), VA ); LinkVehicleToInterior( GetPlayerVehicleID( playerid ), interior ); SetCameraBehindPlayer( playerid ); } else { SetPlayerPos( playerid, Float:X, Float:Y, Float:Z ); SetPlayerFacingAngle( playerid, Float:A ); SetPlayerInterior( playerid, interior ); } PlayerInfo[ playerid ][ ActionID ] = 0; TogglePlayerControllable( playerid, 1 ); gsString[ 0 ] = EOS; format( gsString, sizeof( gsString ), "~r~~h~%s ~y~~h~has gone to ~b~~h~%s", PlayerName( playerid ), CMDName ); ShowOnTextDraw( gsString ); format( gsString, sizeof( gsString ), "~y~Teleported to~n~~r~%s", TeleName ); Announce( playerid, gsString, 3000, 3 ); SetPlayerVirtualWorld( playerid, 0 ); SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ), 0 ); return 1; }