11.03.2012, 03:50
pawn Код:
CMD:i( playerid, params[ ] )
{
new ID, string[ 128 ], string2[ 128 ], name[ MAX_PLAYER_NAME ];
if( sscanf( params, "u", ID ) ) return SendClientMessage( playerid, COLOR_WHITE, "USAGE: /i [id]" );// you had this after using GetDistance
new Float:Distance = GetDistanceBetweenPlayers(playerid,ID);
if( IsPlayerConnected( ID ) == 0) return SendClientMessage( playerid, COLOR_RED, "Player is not connected!" );
GetPlayerName( ID, name, MAX_PLAYER_NAME );
new carid = GetPlayerVehicleID( ID );
TextDrawShowForPlayer( playerid, info1 );
TextDrawShowForPlayer( playerid, info0 );
if( !IsPlayerInAnyVehicle( ID ) )
{
format( string, 128, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Distance:~w~%0.2f~n~~g~Vehicle:~w~On Foot", name, ID, ReturnPlayerZone( ID ), Distance );
}
else
{
format( string, 128, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Distance:~w~%0.2f~n~~g~Vehicle:~w~%s", name, ID, ReturnPlayerZone( ID ), Distance, VehicleNames[ GetVehicleModel( carid ) - 400 ] );
}
TextDrawSetString( info1, string );
return 1;
}