16.07.2011, 21:56
pawn Код:
CMD:goto( playerid, params[ ] )
{
if(!cgoto[playerid]) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This players don0t admit other players to teleport to him");
if(playerinminigame[playerid] == 1) return Error(playerid);
if( isnull( params ) ) return 0; // No player
new targetid = strval( params );
if( !IsPlayerConnected( targetid ) ) return 0; // Targeted player is not connected
new Float: Pos[ 4 ];
GetPlayerPos( targetid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
GetPlayerFacingAngle( targetid, Pos[ 3 ] );
SetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
SetPlayerFacingAngle( playerid, Pos[ 3 ] );
return 1;
}